Subversion Repositories Kolibri OS

Rev

Rev 5760 | Rev 5795 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. //CODED by Veliant, Leency, Nable. GNU GPL licence.
  2. #ifndef INCLUDE_KOLIBRI_H
  3. #define INCLUDE_KOLIBRI_H
  4. #print "[include <kolibri.h>]\n"
  5.  
  6. #pragma option OST
  7. #pragma option ON
  8. #pragma option cri-
  9. #pragma option -CPA
  10. #initallvar 0
  11. #jumptomain FALSE
  12.  
  13. #startaddress 0
  14.  
  15. #code32 TRUE
  16.  
  17. char   os_name[8]   = {'M','E','N','U','E','T','0','1'};
  18. dword  os_version   = 0x00000001;
  19. dword  start_addr   = #______INIT______;
  20. dword  final_addr   = #______STOP______+32;
  21. dword  alloc_mem    = MEMSIZE;
  22. dword  x86esp_reg   = MEMSIZE;
  23. dword  I_Param      = #param;
  24. dword  I_Path       = #program_path;
  25. char param[4096];
  26. char program_path[4096];
  27.  
  28. #define NULL      0
  29. #define OLD      -1
  30. #define true      1
  31. #define false     0
  32.  
  33. //Events
  34.  
  35. #define evReDraw  1
  36. #define evKey     2
  37. #define evButton  3
  38. #define evDesktop 5
  39. #define evMouse   6
  40. #define evIPC     7
  41. #define evNetwork 8
  42. #define evDebug   9
  43.  
  44. #define EVENT_MOUSE case 6: mouse.get();
  45.  
  46. //Button options
  47. #define BT_DEL      0x80000000
  48. #define BT_HIDE     0x40000000
  49. #define BT_NOFRAME  0x20000000
  50.  
  51. //ASCII KEYS
  52. #define ASCII_KEY_BS    008
  53. #define ASCII_KEY_TAB   009
  54. #define ASCII_KEY_ENTER 013
  55. #define ASCII_KEY_ESC   027
  56. #define ASCII_KEY_DEL   182
  57. #define ASCII_KEY_INS   185
  58. #define ASCII_KEY_SPACE 032
  59.  
  60. #define ASCII_KEY_LEFT  176
  61. #define ASCII_KEY_RIGHT 179
  62. #define ASCII_KEY_DOWN  177
  63. #define ASCII_KEY_UP    178
  64. #define ASCII_KEY_HOME  180
  65. #define ASCII_KEY_END   181
  66. #define ASCII_KEY_PGDN  183
  67. #define ASCII_KEY_PGUP  184
  68.  
  69. //SCAN CODE KEYS
  70. #define SCAN_CODE_BS    014
  71. #define SCAN_CODE_TAB   015
  72. #define SCAN_CODE_ENTER 028
  73. #define SCAN_CODE_ESC   001
  74. #define SCAN_CODE_DEL   083
  75. #define SCAN_CODE_INS   082
  76. #define SCAN_CODE_SPACE 057
  77.            
  78. #define SCAN_CODE_LEFT  075
  79. #define SCAN_CODE_RIGHT 077
  80. #define SCAN_CODE_DOWN  080
  81. #define SCAN_CODE_UP    072
  82. #define SCAN_CODE_HOME  071
  83. #define SCAN_CODE_END   079
  84. #define SCAN_CODE_PGDN  081
  85. #define SCAN_CODE_PGUP  073
  86.  
  87.  
  88. inline fastcall word GetKey()  //+Gluk fix
  89. {
  90.                 $push edx
  91. GETKEY:
  92.                 $mov  eax,2
  93.                 $int  0x40
  94.                 $cmp eax,1
  95.                 $jne GETKEYI
  96.                 $mov ah,dh
  97.                 $jmp GETKEYII //jz?
  98. GETKEYI:
  99.                 $mov dh,ah
  100.                 $jmp GETKEY
  101. GETKEYII:
  102.                 $pop edx
  103.                 $shr eax,8
  104. }
  105.  
  106.  
  107. unsigned char key_ascii;
  108. dword key_scancode, key_modifier;
  109. int GetKeys()
  110. {
  111.                 $push edx
  112. GETKEY:
  113.                 $mov  eax,2
  114.                 $int  0x40
  115.                 $cmp eax,1
  116.                 $jne GETKEYI
  117.                 $mov eax,edx
  118.                 $jmp GETKEYII
  119. GETKEYI:
  120.                 $mov edx,eax
  121.                 $jmp GETKEY
  122. GETKEYII:
  123.                 $pop edx
  124.         key_ascii = AH;
  125.         $shr  eax,16
  126.         key_scancode = AL;
  127.         //get alt/shift/ctrl key status
  128.         $mov eax,66
  129.         $mov ebx,3
  130.         $int 0x40
  131.         key_modifier = EAX;
  132. }
  133.  
  134. //allow event mask
  135. #define EVENT_MASK_REDRAW   000000001b
  136. #define EVENT_MASK_KEYBOARD 000000010b
  137. #define EVENT_MASK_BUTTONS  000000100b
  138. #define EVENT_MASK_DESKTOP  000010000b
  139. #define EVENT_MASK_MOUSE    000100000b
  140. #define EVENT_MASK_IPC      001000000b
  141. #define EVENT_MASK_NETWORK  010000000b
  142. #define EVENT_MASK_DEBUG    100000000b
  143.  
  144. //ARGS FUNCTION
  145. #define END_ARGS 0xFF00FF
  146. //-------------------------------------------------------------------------
  147.  
  148. #ifndef INCLUDE_SYSTEM_H
  149. #include "../lib/system.h"
  150. #endif
  151.  
  152. #ifndef INCLUDE_MOUSE_H
  153. #include "../lib/mouse.h"
  154. #endif
  155.  
  156. :struct raw_image {
  157.         dword w, h, data;
  158. };
  159.  
  160.  
  161.  
  162. //------------------------------------------------------------------------------
  163. :dword wait_event_code;
  164. inline fastcall dword WaitEvent()
  165. {
  166.         $mov eax,10
  167.         $int 0x40
  168.         wait_event_code = EAX;
  169.         //if(wait_event_code==evMouse) MOUSE.get();
  170.         //return wait_event_code;
  171. }
  172.  
  173. inline fastcall dword CheckEvent()
  174. {
  175.         $mov eax,11
  176.         $int 0x40
  177. }
  178.  
  179. inline fastcall dword WaitEventTimeout(EBX)
  180. {
  181.         $mov eax,23
  182.         $int 0x40
  183. }
  184.  
  185. inline fastcall SetEventMask(EBX)
  186. {
  187.         $mov eax,40
  188.         $int 0x40
  189. }
  190.  
  191.  
  192. inline fastcall pause(EBX)
  193. {
  194.         $mov eax, 5
  195.         $int 0x40
  196. }
  197.  
  198. inline fastcall word GetButtonID()
  199. {
  200.         $mov eax,17
  201.         $int  0x40
  202.         $shr eax,8
  203. }
  204.  
  205. inline fastcall dword GetFreeRAM()
  206. {
  207.         $mov eax, 18
  208.         $mov ebx, 16
  209.         $int 0x40
  210.         //return eax = ðàçìåð ñâîáîäíîé ïàìÿòè â êèëîáàéòàõ
  211. }
  212.  
  213. inline void draw_line(dword x1,y1,x2,y2,color)
  214. {
  215.         x2--;y2--;y1--;
  216.         $mov EAX,38
  217.         EBX = x1<<16;
  218.         EBX |= x2;
  219.         ECX = y1<<16;
  220.         ECX |= y2;
  221.         $mov EDX,color
  222.         $int 0x40
  223. }
  224.  
  225. inline fastcall dword LoadDriver(ECX) //ECX - èìÿ äðàéâåðà
  226. {
  227.         $mov eax, 68
  228.         $mov ebx, 16
  229.         $int 0x40
  230.         //return 0 - íåóäà÷à, èíà÷å eax = õýíäë äðàéâåðà
  231. }
  232.  
  233. inline fastcall dword RuleDriver(ECX) //óêàçàòåëü íà óïðàâëÿþùóþ ñòðóêòóðó
  234. {
  235.         $mov eax, 68
  236.         $mov ebx, 17
  237.         $int 0x40
  238.         //return eax = îïðåäåëÿåòñÿ äðàéâåðîì
  239. }
  240.  
  241. struct proc_info
  242. {
  243.         #define SelfInfo -1
  244.         dword   use_cpu;
  245.         word    pos_in_stack,num_slot,rezerv1;
  246.         unsigned char name[11];
  247.         char    rezerv2;
  248.         dword   adress,use_memory,ID,left,top,width,height;
  249.         word    status_slot,rezerv3;
  250.         dword   work_left,work_top,work_width,work_height;
  251.         char    status_window;
  252.         dword   cwidth,cheight;
  253.         byte    reserved[1024-71-8];
  254. };
  255.  
  256. inline fastcall void GetProcessInfo(EBX, ECX)
  257. {
  258.         $mov eax,9;
  259.         $int  0x40
  260.         DSDWORD[EBX+71] = DSDWORD[EBX+42] - 9; //set cwidth
  261.         DSDWORD[EBX+75] = DSDWORD[EBX+46] - GetSkinHeight() - 4; //set cheight
  262. }
  263.  
  264. inline fastcall int GetPointOwner( EBX, ECX) //ebx=m.x, ecx=m.y
  265. {
  266.         $mov eax,34
  267.         $int 0x40
  268. }
  269.  
  270. inline fastcall int GetProcessSlot( ECX)
  271. {
  272.         EAX = 18;
  273.         EBX = 21;
  274.         $int 0x40
  275. }
  276.  
  277. inline fastcall int GetActiveProcess()
  278. {
  279.         EAX = 18;
  280.         EBX = 7;
  281.         $int 0x40
  282. }
  283.  
  284. :int CheckActiveProcess(int Form_ID)
  285. {
  286.         int id9=GetProcessSlot(Form_ID);
  287.         if (id9==GetActiveProcess()) return 1;
  288.         return 0;
  289. }
  290.  
  291. inline fastcall void ActivateWindow( ECX)
  292. {
  293.         EAX = 18;
  294.         EBX = 3;
  295.         $int 0x40
  296. }
  297.  
  298. inline fastcall int MinimizeWindow()
  299. {
  300.         EAX = 18;
  301.         EBX = 10;
  302.         $int 0x40
  303. }
  304.  
  305. inline fastcall int CreateThread(ECX,EDX)
  306. {
  307.         $mov eax,51
  308.         $mov ebx,1
  309.         $int 0x40
  310. }
  311.  
  312. inline fastcall void SwitchToAnotherThread()
  313. {
  314.         $mov eax,68
  315.         $mov ebx,1
  316.         $int 0x40
  317. }
  318.  
  319. inline fastcall int SendWindowMessage( ECX, EDX)
  320. {
  321.         $mov eax, 72
  322.         $mov ebx, 1
  323.         $int 0x40
  324. }
  325.  
  326. inline fastcall int KillProcess( ECX)
  327. {
  328.         $mov eax,18;
  329.         $mov ebx,18;
  330.         $int 0x40
  331. }
  332.  
  333. #define TURN_OFF 2
  334. #define REBOOT 3
  335. #define KERNEL 4
  336. inline fastcall int ExitSystem( ECX)
  337. {
  338.         $mov eax, 18
  339.         $mov ebx, 9
  340.         $int 0x40
  341. }
  342.  
  343. inline fastcall ExitProcess()
  344. {
  345.         $mov eax,-1;
  346.         $int 0x40
  347. }
  348.  
  349. //------------------------------------------------------------------------------
  350.  
  351. //eax = ÿçûê ñèñòåìû (1=eng, 2=fi, 3=ger, 4=rus)
  352. inline fastcall int GetSystemLanguage()
  353. {
  354.         EAX = 26;
  355.         EBX = 5;
  356.         $int 0x40
  357. }
  358.  
  359. inline fastcall GetSkinHeight()
  360. {
  361.         $push ebx
  362.         $mov  eax,48
  363.         $mov  ebx,4
  364.         $int 0x40
  365.         $pop  ebx
  366. }
  367.  
  368. inline fastcall void SetSystemSkin( ECX)
  369. {
  370.         EAX = 48;
  371.         EBX = 8;
  372.         $int 0x40
  373. }
  374.  
  375. inline fastcall int GetScreenWidth()
  376. {
  377.         $mov eax, 14
  378.         $int 0x40
  379.         $shr eax, 16
  380. }
  381.  
  382. inline fastcall int GetScreenHeight()
  383. {
  384.         $mov eax, 14
  385.         $int 0x40
  386.         $and eax,0x0000FFFF
  387. }
  388.  
  389. inline fastcall int GetClientTop()
  390. {
  391.         $mov eax, 48
  392.         $mov ebx, 5
  393.         $int 0x40
  394.     $mov eax, ebx
  395.     $shr eax, 16
  396. }
  397.  
  398. inline fastcall int GetClientHeight()
  399. {
  400.         $mov eax, 48
  401.         $mov ebx, 5
  402.         $int 0x40
  403.     $mov eax, ebx
  404. }
  405.  
  406.  
  407. inline fastcall dword LoadLibrary( ECX)
  408. {
  409.         $mov eax, 68
  410.         $mov ebx, 19
  411.         $int  0x40
  412. }
  413.  
  414. inline fastcall int TestBit( EAX, CL)
  415. {
  416.         $shr eax,cl
  417.         $and eax,1
  418. }
  419.  
  420. inline fastcall int PlaySpeaker( ESI)
  421. {
  422.         $mov eax, 55
  423.         $mov ebx, 55
  424.         $int 0x40
  425. }
  426.  
  427. inline fastcall void debugln( EDX)
  428. {
  429.         $push eax
  430.         $push ebx
  431.         $push ecx
  432.         $mov eax, 63
  433.         $mov ebx, 1
  434. NEXT_CHAR:
  435.         $mov ecx, DSDWORD[edx]
  436.         $or      cl, cl
  437.         $jz  DONE
  438.         $int 0x40
  439.         $inc edx
  440.         $jmp NEXT_CHAR
  441. DONE:
  442.         $mov cl, 13
  443.         $int 0x40
  444.         $mov cl, 10
  445.         $int 0x40
  446.         $pop ecx
  447.         $pop ebx
  448.         $pop eax
  449. }
  450.  
  451. inline fastcall void debug( EDX)
  452. {
  453.         $push eax
  454.         $push ebx
  455.         $push ecx
  456.         $mov eax, 63
  457.         $mov ebx, 1
  458. NEXT_CHAR:
  459.         $mov ecx, DSDWORD[edx]
  460.         $or      cl, cl
  461.         $jz  DONE
  462.         $int 0x40
  463.         $inc edx
  464.         $jmp NEXT_CHAR
  465. DONE:
  466.         $pop ecx
  467.         $pop ebx
  468.         $pop eax
  469. }
  470.  
  471.  
  472. inline fastcall void debugch( ECX)
  473. {
  474.         $push eax
  475.         $push ebx
  476.         $mov eax,63
  477.         $mov ebx,1
  478.         $int 0x40
  479.         $pop ebx
  480.         $pop eax
  481. }
  482. //------------------------------------------------------------------------------
  483.  
  484. void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, EDI, ESI)
  485. {
  486.         EAX = 12;              // function 12:tell os about windowdraw
  487.         EBX = 1;
  488.         $int 0x40
  489.        
  490.         $xor EAX,EAX
  491.         EBX = x << 16 + size_w;
  492.         ECX = y << 16 + size_h;
  493.  
  494.         EDX = WindowType << 24 | WindowAreaColor;
  495.         $int 0x40
  496.  
  497.         EAX = 12;              // function 12:tell os about windowdraw
  498.         EBX = 2;
  499.         $int 0x40
  500. }
  501.  
  502. inline fastcall MoveSize( EBX,ECX,EDX,ESI)
  503. {
  504.         $mov eax, 67
  505.         $int 0x40
  506. }
  507.  
  508. inline fastcall void DrawTitle( ECX)
  509. {
  510.         EAX = 71;
  511.         EBX = 1;
  512.         $int 0x40;
  513. }
  514.  
  515. void WriteTextB(dword x,y,byte fontType, dword color, EDX)
  516. {
  517.         EAX = 4;
  518.         EBX = x<<16+y;
  519.         ECX = fontType<<24+color;
  520.         ESI = 0;
  521.         $int 0x40;
  522.         $add ebx, 1<<16
  523.         $int 0x40
  524. }
  525.  
  526. void WriteText(dword x,y,byte fontType, dword color, EDX)
  527. {
  528.         EAX = 4;
  529.         EBX = x<<16+y;
  530.         ECX = fontType<<24+color;
  531.         $int 0x40;
  532. }
  533.  
  534. dword WriteBufText(dword x,y,byte fontType, dword color, EDX, EDI)
  535. {
  536.         EAX = 4;
  537.         EBX = x<<16+y;
  538.         ECX = fontType<<24+color;
  539.         $int 0x40;
  540. }
  541.  
  542. void WriteNumber(dword x,y,byte fontType, dword color, count, ECX)
  543. {
  544.         EAX = 47;
  545.         EBX = count<<16;
  546.         EDX = x<<16+y;
  547.         ESI = fontType<<24+color;
  548.         $int 0x40;
  549. }
  550.  
  551. void CopyScreen(dword EBX, x, y, w, h)
  552. {
  553.   EAX = 36;
  554.   ECX = w << 16 + h;
  555.   EDX = x << 16 + y;
  556.   $int  0x40;
  557. }
  558.  
  559. :dword GetPixelColor(dword x, x_size, y)
  560. {
  561.         $mov eax, 35
  562.         EBX= y*x_size+x;
  563.         $int 0x40
  564. }
  565.  
  566.  
  567. void _PutImage(dword x,y, w,h, EBX)
  568. {
  569.         EAX = 7;
  570.         ECX = w<<16+h;
  571.         EDX = x<<16+y;
  572.         $int 0x40
  573. }
  574.  
  575. void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI)
  576. {
  577.         EAX = 65;
  578.         ECX = w<<16+h;
  579.         EDX = x<<16+y;
  580.         EBP = 0;
  581.         $int 0x40
  582. }
  583.  
  584. inline fastcall void PutPixel( EBX,ECX,EDX)
  585. {
  586.   EAX=1;
  587.   $int 0x40
  588. }
  589.  
  590. void DrawBar(dword x,y,w,h,EDX)
  591. {
  592.         if (h<=0) || (h>60000) || (w<=0) || (w>60000) return; //bad boy :)
  593.         EAX = 13;
  594.         EBX = x<<16+w;
  595.         ECX = y<<16+h;
  596.         $int 0x40
  597. }
  598.  
  599. void DefineButton(dword x,y,w,h,EDX,ESI)
  600. {
  601.         EAX = 8;
  602.         $push edx
  603.         EDX += BT_DEL;
  604.         $int 0x40;
  605.         $pop edx
  606.         EBX = x<<16+w;
  607.         ECX = y<<16+h;
  608.         $int 0x40
  609. }
  610.  
  611. inline RefreshWindow(dword ID_REFRESH,ID_ACTIVE)
  612. {
  613.         EAX = 18;
  614.         EBX = 22;
  615.         ECX = 3;
  616.         EDX = ID_REFRESH;
  617.         $int 0x40
  618.         EAX = 18;
  619.         EBX = 3;
  620.         EDX = ID_ACTIVE;
  621.         $int 0x40
  622. }
  623.  
  624. inline getIPC(ECX,EDX)
  625. {
  626.         $mov EAX,60
  627.         $mov EBX,2
  628.         $int 0x40
  629. }
  630.  
  631. inline sendIPC(ECX,EDX,ESI)
  632. {
  633.         $mov EAX,60
  634.         $mov EBX,1
  635.         $int 0x40
  636. }
  637.  
  638. void UnsafeDefineButton(dword x,y,w,h,EDX,ESI)
  639. {
  640.         EAX = 8;
  641.         EBX = x<<16+w;
  642.         ECX = y<<16+h;
  643.         $int 0x40
  644. }
  645.  
  646. inline fastcall void DeleteButton( EDX)
  647. {
  648.         EAX = 8;
  649.         EDX += BT_DEL;
  650.         $int 0x40
  651. }
  652.  
  653. inline fastcall dword GetStartTime()
  654. {
  655.         $mov eax,26
  656.         $mov ebx,9
  657.         $int 0x40
  658. }
  659.  
  660. :dword X_EventRedrawWindow,Y_EventRedrawWindow;
  661. :void _EventRedrawWindow()
  662. {
  663.         loop()switch(WaitEvent())
  664.         {
  665.                 case evReDraw:
  666.                         DefineAndDrawWindow(X_EventRedrawWindow,Y_EventRedrawWindow,100,1,1,0x34,0xFFFFFF,"");
  667.                         pause(10);
  668.                         ExitProcess();
  669.                         break;
  670.         }
  671. }
  672. :char REDRAW_BUFF_EVENT_[4096];
  673. :void EventRedrawWindow(dword x,y)
  674. {
  675.         X_EventRedrawWindow = x;
  676.         Y_EventRedrawWindow = y;
  677.         CreateThread(#_EventRedrawWindow,#REDRAW_BUFF_EVENT_+4092);
  678. }
  679.  
  680. :dword ALERT_TEXT;
  681. :void dialog_alert()
  682. {
  683.         byte id;
  684.         loop()switch(WaitEvent())
  685.         {
  686.                 case evReDraw:
  687.                         DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Alert");
  688.                         WriteTextB(5,5,0x90,0x0,ALERT_TEXT);
  689.                 break;
  690.                 case evKey:
  691.                 case evButton:
  692.                         id=GetButtonID();
  693.                         if (id==1) ExitProcess();
  694.                 break;
  695.         }
  696. }
  697. :dword alert(dword text)
  698. {
  699.         dword mem = malloc(4096);
  700.         ALERT_TEXT = text;
  701.         CreateThread(#dialog_alert,mem+4092);
  702.         return mem;
  703. }
  704.  
  705. :struct _screen
  706. {
  707.         dword width,height;
  708. } screen;
  709.  
  710. :struct _skin
  711. {
  712.         dword width,height;
  713. } SKIN;
  714.  
  715. :void DrawDate(dword x, y, color, in_date)
  716. {
  717.         //char text[15];
  718.         EDI = in_date;
  719.         EAX = 47;
  720.         EBX = 2<<16;
  721.         EDX = x<<16+y;
  722.         ESI = 0x80<<24+color;
  723.         ECX = EDI.date.day;
  724.         $int 0x40;
  725.         EDX += 18<<16;
  726.         ECX = EDI.date.month;
  727.         $int 0x40;
  728.         EDX += 18<<16;
  729.         EBX = 4<<16;
  730.         ECX = EDI.date.year;
  731.         $int 0x40;
  732.         PutPixel(x+14,y+6,color);
  733.         PutPixel(x+32,y+6,color);
  734.         //sprintf(#text,"%d",EDI.date.year);
  735.         //WriteText(x, y, 0x80, 0x000000, #text);
  736. }
  737.  
  738. :void __path_name__(dword BUF,PATH)
  739. {
  740.         dword beg = PATH;
  741.         dword pos = PATH;
  742.         dword sav = PATH;
  743.         dword i;
  744.         while(DSBYTE[pos])
  745.         {
  746.                 if(DSBYTE[pos]=='/')sav = pos;
  747.                 pos++;
  748.         }
  749.         i = sav-beg;
  750.         while(i)
  751.         {
  752.                 DSBYTE[BUF] = DSBYTE[beg];
  753.                 beg++;
  754.                 BUF++;
  755.                 i--;
  756.         }
  757.         /*while(DSBYTE[beg])
  758.         {
  759.                 DSBYTE[BUF1] = DSBYTE[beg];
  760.                 beg++;
  761.                 BUF1++;
  762.         }*/
  763.         //DSBYTE[BUF1] = 0;
  764.         DSBYTE[BUF] = 0;
  765. }
  766. char __BUF_DIR__[4096];
  767. :struct SELF
  768. {
  769.         dword dir;
  770.         dword file;
  771.         dword path;
  772. } self;
  773.  
  774. dword __generator;  // random number generator - äëÿ ãåíåðàöèè ñëó÷àéíûõ ÷èñåë
  775.  
  776. :dword program_path_length;
  777.  
  778. //The initialization of the initial data before running
  779. void ______INIT______()
  780. {
  781.         self.dir = #__BUF_DIR__;
  782.         self.file = 0;
  783.         self.path = I_Path;
  784.         __path_name__(#__BUF_DIR__,I_Path);
  785.        
  786.         SKIN.height   = GetSkinHeight();
  787.         screen.width  = GetScreenWidth();
  788.         screen.height = GetScreenHeight();
  789.        
  790.         //program_path_length = strlen(I_Path);
  791.         MOUSE_TIME = 50; //Default 500 ms.
  792.         __generator = GetStartTime();
  793.        
  794.         $push    ebx
  795.         $mov     eax, 68
  796.         $mov     ebx, 11
  797.         $int     0x40
  798.        
  799.         $pop     ebx
  800.  
  801.         main();
  802. }
  803. ______STOP______:
  804. #endif