2011-06-25 03:52:11 +02:00
|
|
|
|
//CODED by Veliant, Leency, Nable. GNU GPL licence.
|
|
|
|
|
|
|
|
|
|
#startaddress 0
|
|
|
|
|
#code32 TRUE
|
|
|
|
|
|
|
|
|
|
char os_name[8] = {'M','E','N','U','E','T','0','1'};
|
|
|
|
|
dword os_version = 0x00000001;
|
|
|
|
|
dword start_addr = #main;
|
|
|
|
|
dword final_addr = #stop+32;
|
|
|
|
|
dword alloc_mem = #0x00100000;
|
|
|
|
|
dword x86esp_reg = #0x00100000;
|
|
|
|
|
dword I_Param = #param;
|
2011-08-20 17:36:15 +02:00
|
|
|
|
dword I_Path = #program_path;
|
2012-04-04 23:00:56 +02:00
|
|
|
|
char param[4096];
|
|
|
|
|
char program_path[4096];
|
2011-06-25 03:52:11 +02:00
|
|
|
|
|
|
|
|
|
//Events
|
2012-06-20 21:58:55 +02:00
|
|
|
|
#define evMouse 6
|
|
|
|
|
#define evButton 3
|
|
|
|
|
#define evKey 2
|
|
|
|
|
#define evReDraw 1
|
|
|
|
|
|
|
|
|
|
#define OLD -1
|
|
|
|
|
#define true 1
|
|
|
|
|
#define false 0
|
2011-06-25 03:52:11 +02:00
|
|
|
|
|
|
|
|
|
//Button options
|
2012-06-20 21:58:55 +02:00
|
|
|
|
#define BT_DEL 0x80000000
|
|
|
|
|
#define BT_HIDE 0x40000000
|
|
|
|
|
#define BT_NOFRAME 0x20000000
|
2011-06-25 03:52:11 +02:00
|
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
struct mouse
|
|
|
|
|
{
|
|
|
|
|
dword x,y,lkm,pkm,hor,vert;
|
|
|
|
|
void get();
|
2011-06-25 03:52:11 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void mouse::get()
|
|
|
|
|
{
|
|
|
|
|
EAX = 37;
|
|
|
|
|
EBX = 1;
|
|
|
|
|
$int 0x40
|
|
|
|
|
$mov ebx, eax
|
|
|
|
|
$shr eax, 16
|
|
|
|
|
$and ebx,0x0000FFFF
|
|
|
|
|
x = EAX;
|
|
|
|
|
y = EBX;
|
|
|
|
|
EAX = 37;
|
|
|
|
|
EBX = 2;
|
|
|
|
|
$int 0x40
|
|
|
|
|
$mov ebx, eax
|
|
|
|
|
$and eax, 0x00000001
|
|
|
|
|
$shr ebx, 1
|
|
|
|
|
$and ebx, 0x00000001
|
|
|
|
|
lkm = EAX;
|
|
|
|
|
pkm = EBX;
|
|
|
|
|
EAX = 37; //<2F><><EFBFBD>
|
|
|
|
|
EBX = 7;
|
|
|
|
|
$int 0x40
|
|
|
|
|
$mov ebx, eax
|
|
|
|
|
$shr eax, 16
|
|
|
|
|
$and ebx,0x0000FFFF
|
|
|
|
|
//hor = EAX;
|
|
|
|
|
vert = EBX;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
struct system_colors
|
|
|
|
|
{
|
2011-06-25 03:52:11 +02:00
|
|
|
|
dword frame,grab,grab_button,grab_button_text,grab_text,work,work_button,work_button_text,work_text,work_graph;
|
|
|
|
|
void get();
|
|
|
|
|
};
|
2012-06-20 19:22:56 +02:00
|
|
|
|
|
2011-06-25 03:52:11 +02:00
|
|
|
|
void system_colors::get()
|
|
|
|
|
{
|
|
|
|
|
EAX = 48;
|
|
|
|
|
EBX = 3;
|
|
|
|
|
ECX = #frame;
|
|
|
|
|
EDX = 40;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall dword WaitEvent()
|
|
|
|
|
{
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,10
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall dword CheckEvent()
|
|
|
|
|
{
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,11
|
|
|
|
|
$int 0x40
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall dword WaitEventTimeout( EBX)
|
|
|
|
|
{
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,23
|
|
|
|
|
$int 0x40
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall SetEventMask( EBX)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,40
|
|
|
|
|
$int 0x40
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline fastcall ScancodesGeting(){
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,66
|
|
|
|
|
$mov ebx,1
|
|
|
|
|
$mov ecx,1 //᪠<><E1AAA0><EFBFBD><EFBFBD><EFBFBD>
|
2011-06-25 03:52:11 +02:00
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2011-08-20 17:36:15 +02:00
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall word GetKey() //+Gluk fix
|
|
|
|
|
{
|
2011-08-20 17:36:15 +02:00
|
|
|
|
$push edx
|
|
|
|
|
@getkey:
|
|
|
|
|
$mov eax,2
|
|
|
|
|
$int 0x40
|
|
|
|
|
$cmp eax,1
|
|
|
|
|
$jne getkeyi
|
|
|
|
|
$mov ah,dh
|
|
|
|
|
$jmp getkeyii //jz?
|
|
|
|
|
@getkeyi:
|
|
|
|
|
$mov dh,ah
|
|
|
|
|
$jmp getkey
|
|
|
|
|
@getkeyii:
|
|
|
|
|
$pop edx
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$shr eax,8
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-02-28 11:49:22 +01:00
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall Pause( EBX)
|
|
|
|
|
{
|
2012-02-28 11:49:22 +01:00
|
|
|
|
$mov eax, 5
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall word GetButtonID()
|
|
|
|
|
{
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,17
|
|
|
|
|
$int 0x40
|
|
|
|
|
$shr eax,8
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-07-02 20:24:48 +02:00
|
|
|
|
//----------------------------------------
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
struct proc_info
|
|
|
|
|
{
|
|
|
|
|
#define SelfInfo -1
|
2012-02-28 11:49:22 +01:00
|
|
|
|
dword use_cpu;
|
|
|
|
|
word pos_in_stack,num_slot,rezerv1;
|
|
|
|
|
char name[11];
|
|
|
|
|
char rezerv2;
|
|
|
|
|
dword adress,use_memory,ID,left,top,width,height;
|
|
|
|
|
word status_slot,rezerv3;
|
|
|
|
|
dword work_left,work_top,work_width,work_height;
|
|
|
|
|
char status_window;
|
2012-06-20 19:22:56 +02:00
|
|
|
|
void GetInfo( ECX);
|
2012-02-28 11:49:22 +01:00
|
|
|
|
byte reserved[1024-71];
|
|
|
|
|
};
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
void GetProcessInfo( EBX, ECX)
|
2012-02-28 11:49:22 +01:00
|
|
|
|
{
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,9;
|
2012-02-28 11:49:22 +01:00
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-02 20:24:48 +02:00
|
|
|
|
inline fastcall int GetPointOwner( EBX, ECX) //ebx=m.x, ecx=m.y
|
|
|
|
|
{
|
|
|
|
|
$mov eax,34
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
inline fastcall int GetProcessSlot( ECX)
|
2012-02-28 11:49:22 +01:00
|
|
|
|
{
|
|
|
|
|
EAX = 18;
|
|
|
|
|
EBX = 21;
|
2012-06-25 16:14:43 +02:00
|
|
|
|
$int 0x40
|
2012-02-28 11:49:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
inline fastcall int GetActiveProcess()
|
2012-06-13 00:13:05 +02:00
|
|
|
|
{
|
|
|
|
|
EAX = 18;
|
|
|
|
|
EBX = 7;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-02 20:24:48 +02:00
|
|
|
|
inline fastcall int CreateThread( ECX,EDX)
|
|
|
|
|
{
|
|
|
|
|
$mov eax,51
|
|
|
|
|
$mov ebx,1
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline fastcall void SwitchToAnotherThread()
|
|
|
|
|
{
|
|
|
|
|
$mov eax,68
|
|
|
|
|
$mov ebx,1
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
2012-06-13 00:13:05 +02:00
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall ExitProcess()
|
|
|
|
|
{
|
2012-06-13 16:12:42 +02:00
|
|
|
|
$mov eax,-1;
|
|
|
|
|
$int 0x40
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall int KillProcess( ECX)
|
|
|
|
|
{
|
2012-02-28 11:49:22 +01:00
|
|
|
|
$mov eax,18;
|
|
|
|
|
$mov ebx,18;
|
2011-06-25 03:52:11 +02:00
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
//------------------------------------------------------------------------------
|
2011-06-25 03:52:11 +02:00
|
|
|
|
|
2011-09-30 19:37:08 +02:00
|
|
|
|
//eax = <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (1=eng, 2=fi, 3=ger, 4=rus)
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall int GetSystemLanguage()
|
|
|
|
|
{
|
|
|
|
|
EAX = 26;
|
|
|
|
|
EBX = 5;
|
|
|
|
|
$int 0x40
|
2011-09-30 19:37:08 +02:00
|
|
|
|
}
|
|
|
|
|
|
2011-06-25 03:52:11 +02:00
|
|
|
|
inline fastcall dword GetSkinWidth()
|
|
|
|
|
{
|
2012-06-17 14:03:52 +02:00
|
|
|
|
$push ebx
|
|
|
|
|
$mov eax,48
|
|
|
|
|
$mov ebx,4
|
2011-06-25 03:52:11 +02:00
|
|
|
|
$int 0x40
|
2012-06-17 14:03:52 +02:00
|
|
|
|
$pop ebx
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
inline fastcall void SetSystemSkin( ECX)
|
|
|
|
|
{
|
2011-06-25 03:52:11 +02:00
|
|
|
|
EAX = 48;
|
|
|
|
|
EBX = 8;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline fastcall dword GetScreenWidth()
|
|
|
|
|
{
|
|
|
|
|
EAX = 14;
|
|
|
|
|
EBX = 4;
|
|
|
|
|
$int 0x40
|
|
|
|
|
$shr eax, 16
|
|
|
|
|
$and eax,0x0000FFFF
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall dword LoadLibrary( ECX)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
|
|
|
|
$mov eax, 68
|
|
|
|
|
$mov ebx, 19
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
byte fastcall TestBit( EAX, CL)
|
|
|
|
|
{
|
|
|
|
|
$shr eax,cl
|
|
|
|
|
$and eax,1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
//------------------------------------------------------------------------------
|
2011-06-25 03:52:11 +02:00
|
|
|
|
|
|
|
|
|
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,byte headerType,dword headerColour,EDI)
|
|
|
|
|
{
|
2012-02-28 11:49:22 +01:00
|
|
|
|
EAX = 12; // function 12:tell os about windowdraw
|
|
|
|
|
EBX = 1;
|
|
|
|
|
$int 0x40
|
|
|
|
|
|
2011-06-25 03:52:11 +02:00
|
|
|
|
EBX = x << 16 + sizeX;
|
|
|
|
|
ECX = y << 16 + sizeY;
|
|
|
|
|
EDX = mainAreaType << 24 | mainAreaColour;
|
|
|
|
|
ESI = headerType << 24 | headerColour;
|
|
|
|
|
$xor eax,eax
|
|
|
|
|
$int 0x40
|
2012-02-28 11:49:22 +01:00
|
|
|
|
|
|
|
|
|
EAX = 12; // function 12:tell os about windowdraw
|
|
|
|
|
EBX = 2;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
inline fastcall MoveSize( EBX,ECX,EDX,ESI)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
2012-06-25 16:14:43 +02:00
|
|
|
|
EAX = 67;
|
2011-06-25 03:52:11 +02:00
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
inline fastcall void DrawTitle( ECX)
|
2012-03-22 14:28:02 +01:00
|
|
|
|
{
|
2012-06-25 16:14:43 +02:00
|
|
|
|
EAX = 71;
|
|
|
|
|
EBX = 1;
|
|
|
|
|
$int 0x40;
|
2012-03-22 14:28:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
2011-06-25 03:52:11 +02:00
|
|
|
|
void WriteText(dword x,y,byte fontType, dword color, EDX, ESI)
|
|
|
|
|
{
|
|
|
|
|
EAX = 4;
|
|
|
|
|
EBX = x<<16+y;
|
|
|
|
|
ECX = fontType<<24+color;
|
|
|
|
|
$int 0x40;
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-10 10:54:53 +01:00
|
|
|
|
void CopyScreen(dword EBX, x, y, sizeX, sizeY)
|
|
|
|
|
{
|
|
|
|
|
EAX = 36;
|
|
|
|
|
ECX = sizeX << 16 + sizeY;
|
|
|
|
|
EDX = x << 16 + y;
|
|
|
|
|
$int 0x40;
|
|
|
|
|
}
|
|
|
|
|
|
2011-06-25 03:52:11 +02:00
|
|
|
|
void PutImage(dword EBX,w,h,x,y)
|
|
|
|
|
{
|
|
|
|
|
EAX = 7;
|
|
|
|
|
ECX = w<<16+h;
|
|
|
|
|
EDX = x<<16+y;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI)
|
|
|
|
|
{
|
|
|
|
|
EAX = 65;
|
|
|
|
|
ECX = w<<16+h;
|
|
|
|
|
EDX = x<<16+y;
|
|
|
|
|
EBP = 0;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall void PutPixel( EBX,ECX,EDX)
|
|
|
|
|
{
|
2011-06-25 03:52:11 +02:00
|
|
|
|
EAX=1;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawBar(dword x,y,w,h,EDX)
|
|
|
|
|
{
|
|
|
|
|
EAX = 13;
|
|
|
|
|
EBX = x<<16+w;
|
|
|
|
|
ECX = y<<16+h;
|
|
|
|
|
$int 0x40
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DefineButton(dword x,y,w,h,EDX,ESI)
|
|
|
|
|
{
|
|
|
|
|
EAX = 8;
|
|
|
|
|
EBX = x<<16+w;
|
|
|
|
|
ECX = y<<16+h;
|
2012-03-30 12:14:05 +02:00
|
|
|
|
$int 0x40
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall void DeleteButton( EDX)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
|
|
|
|
EAX = 8;
|
|
|
|
|
EDX += BT_DEL;
|
|
|
|
|
$int 0x40;
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
void DrawRegion(dword x,y,width,height,color1)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
|
|
|
|
DrawBar(x,y,width,1,color1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᢥ<><E1A2A5><EFBFBD>
|
|
|
|
|
DrawBar(x,y+height,width,1,color1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᭨<><E1ADA8>
|
|
|
|
|
DrawBar(x,y,1,height,color1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <><E1ABA5>
|
|
|
|
|
DrawBar(x+width,y,1,height+1,color1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ࠢ<EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
void DrawRegion_3D(dword x,y,width,height,color1,color2)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
|
|
|
|
DrawBar(x,y,width+1,1,color1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᢥ<><E1A2A5><EFBFBD>
|
|
|
|
|
DrawBar(x,y+1,1,height-1,color1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E1ABA5>
|
|
|
|
|
DrawBar(x+width,y+1,1,height,color2); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ࠢ<EFBFBD>
|
|
|
|
|
DrawBar(x,y+height,width,1,color2); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᭨<><E1ADA8>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawFlatButton(dword x,y,width,height,id,color,text)
|
|
|
|
|
{
|
|
|
|
|
DrawRegion_3D(x,y,width,height,0x94AECE,0x94AECE);
|
|
|
|
|
DrawRegion_3D(x+1,y+1,width-2,height-2,0xFFFFFF,0xC7C7C7);
|
|
|
|
|
DrawBar(x+2,y+2,width-3,height-3,color); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
IF (id<>0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-06-25 16:14:43 +02:00
|
|
|
|
//WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0);
|
|
|
|
|
WriteText(width/2+x+1,height/2-3+y,0x80,0,text,0);
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 16:14:43 +02:00
|
|
|
|
void DrawCircle(int x, y, r)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
2012-06-25 16:14:43 +02:00
|
|
|
|
int i;
|
|
|
|
|
float px=0, py=r, ii = r * 3.1415926 * 2;
|
2011-06-25 14:58:55 +02:00
|
|
|
|
FOR (i = 0; i < ii; i++)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
|
|
|
|
PutPixel(px + x, y - py, 0);
|
|
|
|
|
px = py / r + px;
|
|
|
|
|
py = -px / r + py;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
2012-06-20 19:22:56 +02:00
|
|
|
|
inline fastcall void debug( EDX)
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
|
|
|
|
$push ebx
|
|
|
|
|
$push ecx
|
|
|
|
|
$mov eax, 63
|
|
|
|
|
$mov ebx, 1
|
|
|
|
|
next_char:
|
|
|
|
|
$mov ecx, DSDWORD[edx]
|
|
|
|
|
$or cl, cl
|
|
|
|
|
$jz done
|
|
|
|
|
$int 0x40
|
|
|
|
|
$inc edx
|
|
|
|
|
$jmp next_char
|
|
|
|
|
done:
|
|
|
|
|
$mov cl, 13
|
|
|
|
|
$int 0x40
|
|
|
|
|
$mov cl, 10
|
|
|
|
|
$int 0x40
|
|
|
|
|
$pop ecx
|
|
|
|
|
$pop ebx
|
|
|
|
|
}
|