Subversion Repositories Kolibri OS

Rev

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