2009-01-28 05:28:31 +01:00
|
|
|
#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;
|
2011-01-27 13:34:09 +01:00
|
|
|
dword alloc_mem = 0x00004096;
|
|
|
|
dword x86esp_reg = 0x00004096;
|
2009-01-28 05:28:31 +01:00
|
|
|
dword I_Param = 0x0;
|
|
|
|
dword I_Icon = 0x0;
|
|
|
|
|
|
|
|
#define evButton 3
|
|
|
|
#define evKey 2
|
|
|
|
#define evReDraw 1
|
|
|
|
|
|
|
|
#define BT_DEL 0x80000000
|
2011-01-27 13:34:09 +01:00
|
|
|
#define BT_HIDE 0x40000000
|
2009-01-28 05:28:31 +01:00
|
|
|
#define BT_NOFRAME 0x20000000
|
|
|
|
|
|
|
|
|
2011-08-18 15:58:49 +02:00
|
|
|
struct proc_info{
|
|
|
|
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;
|
|
|
|
void GetInfo(dword ECX);
|
|
|
|
byte reserved[1024-71];
|
|
|
|
#define SelfInfo -1
|
|
|
|
};
|
|
|
|
|
2011-09-30 14:05:09 +02:00
|
|
|
void GetProcessInfo(dword EBX, ECX)
|
2011-08-18 15:58:49 +02:00
|
|
|
{
|
|
|
|
EAX = 9;
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
2011-01-27 13:34:09 +01:00
|
|
|
struct system_colors{
|
|
|
|
dword frame,grab,grab_button,grab_button_text,grab_text,work,work_button,work_button_text,work_text,work_graph;
|
|
|
|
void get();
|
|
|
|
};
|
|
|
|
void system_colors::get()
|
|
|
|
{
|
|
|
|
EAX = 48;
|
|
|
|
EBX = 3;
|
|
|
|
ECX = #frame;
|
|
|
|
EDX = 40;
|
|
|
|
$int 0x40
|
|
|
|
}
|
2009-01-28 05:28:31 +01:00
|
|
|
|
|
|
|
inline fastcall dword WaitEvent(){
|
|
|
|
EAX = 10; // wait here for event
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline fastcall void ExitProcess(){
|
|
|
|
EAX = -1; // close this program
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
2011-01-27 13:34:09 +01:00
|
|
|
inline fastcall byte GetKey(){
|
2009-01-28 05:28:31 +01:00
|
|
|
EAX = 2; // just read it key from buffer
|
|
|
|
$int 0x40
|
|
|
|
EAX = EAX >> 8;
|
|
|
|
}
|
|
|
|
|
2011-01-27 13:34:09 +01:00
|
|
|
inline fastcall byte GetButtonID(){
|
2009-01-28 05:28:31 +01:00
|
|
|
EAX = 17; // Get ID
|
|
|
|
$int 0x40
|
|
|
|
EAX = EAX >> 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline fastcall dword GetSkinWidth()
|
|
|
|
{
|
|
|
|
EAX = 48;
|
|
|
|
EBX = 4;
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
2011-08-18 15:58:49 +02:00
|
|
|
|
|
|
|
void DefineButton(dword x,y,w,h,EDX,ESI)
|
|
|
|
{
|
|
|
|
EAX = 8;
|
|
|
|
EBX = x<<16+w;
|
|
|
|
ECX = y<<16+h;
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
2009-01-28 05:28:31 +01:00
|
|
|
inline fastcall void DeleteButton(dword EDX)
|
|
|
|
{
|
|
|
|
EAX = 8;
|
|
|
|
EDX += BT_DEL;
|
|
|
|
$int 0x40;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-08-18 15:58:49 +02:00
|
|
|
|
2009-01-28 05:28:31 +01:00
|
|
|
inline fastcall void WindowRedrawStatus(dword EBX){
|
|
|
|
EAX = 12;
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,byte headerType,dword headerColour,EDI)
|
|
|
|
{
|
2011-08-18 15:58:49 +02:00
|
|
|
WindowRedrawStatus(1);
|
2011-01-27 13:34:09 +01:00
|
|
|
EAX = 0;
|
2009-01-28 05:28:31 +01:00
|
|
|
EBX = x << 16 + sizeX;
|
|
|
|
ECX = y << 16 + sizeY;
|
|
|
|
EDX = mainAreaType << 24 | mainAreaColour;
|
|
|
|
ESI = headerType << 24 | headerColour;
|
|
|
|
$int 0x40
|
2011-08-18 15:58:49 +02:00
|
|
|
WindowRedrawStatus(2);
|
2009-01-28 05:28:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WriteText(dword x,y,byte fontType, dword color, EDX, ESI)
|
|
|
|
{
|
|
|
|
EAX = 4;
|
2009-01-28 16:20:29 +01:00
|
|
|
EBX = x<<16+y;
|
2009-01-28 05:28:31 +01:00
|
|
|
ECX = fontType<<24+color;
|
|
|
|
$int 0x40;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DrawBar(dword x,y,w,h,EDX)
|
|
|
|
{
|
|
|
|
EAX = 13;
|
|
|
|
EBX = x<<16+w;
|
2009-01-28 16:20:29 +01:00
|
|
|
ECX = y<<16+h;
|
2009-01-28 05:28:31 +01:00
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-28 16:20:29 +01:00
|
|
|
void PutImage(dword EBX,w,h,x,y)
|
2009-01-28 05:28:31 +01:00
|
|
|
{
|
|
|
|
EAX = 7;
|
|
|
|
ECX = w<<16+h;
|
2009-01-28 16:20:29 +01:00
|
|
|
EDX = x<<16+y;
|
2009-01-28 05:28:31 +01:00
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void copystr(dword s,d)
|
|
|
|
{
|
|
|
|
$mov esi,s
|
|
|
|
$mov edi,d
|
|
|
|
$cld
|
|
|
|
l1:
|
|
|
|
$lodsb
|
|
|
|
$stosb
|
|
|
|
$test al,al
|
|
|
|
$jnz l1
|
|
|
|
}
|
|
|
|
|
2009-01-28 16:20:29 +01:00
|
|
|
void WriteNumber(dword x,y,byte fontType, ESI, ECX)
|
2009-01-28 05:28:31 +01:00
|
|
|
{
|
2009-01-28 16:20:29 +01:00
|
|
|
EAX = 47;
|
|
|
|
EBX = 2<<16;
|
|
|
|
EDX = x<<16+y;
|
|
|
|
ESI = fontType<<24+ESI;
|
|
|
|
$int 0x40;
|
|
|
|
}
|