+++ /dev/null
-\r
-#include "core.h"\r
-\r
-uint *API_Execute(uint edi, uint esi, uint ebp, uint esp, uint ebx, uint edx, uint ecx, uint eax)\r
-{\r
- UI_Task *nowtask;\r
- uchar s[128];\r
- uint i;\r
-\r
- nowtask = MultiTask_Get_NowTask();\r
-\r
- if(edx == 0x00000001){\r
- InputBox_Put_Character(nowtask->cons->input, eax & 0xff);\r
- } else if(edx == 0x00000002){\r
- InputBox_Put_String(nowtask->cons->input, (uchar *)(ebx + System_SegmentDescriptor_Get_Base(nowtask->cons->app_ds)));\r
- } else if(edx == 0x00000003){\r
- for(i = 0; i < ecx; i++){\r
- InputBox_Put_Character(nowtask->cons->input, ((uchar *)ebx + System_SegmentDescriptor_Get_Base(nowtask->cons->app_ds))[i]);\r
- }\r
- } else if(edx == 0x00000004){\r
- return &nowtask->tss.esp0;\r
- } else{\r
- sprintf(s, "API:0x%08X:Unknown API Function.\n", edx);\r
- InputBox_Put_String(nowtask->cons->input, s);\r
- }\r
-\r
- return 0;\r
-}\r