Many changes, Mostly working on improving the BootConf script engine.
[tpg/acess2.git] / Kernel / arch / x86 / start.asm
index b1884ae..d9a1e50 100644 (file)
@@ -148,6 +148,26 @@ GetEIP:
        mov eax, [esp]\r
        ret\r
 \r
+; int CallWithArgArray(void *Ptr, int NArgs, Uint *Args)\r
+; Call a function passing the array as arguments\r
+[global CallWithArgArray]\r
+CallWithArgArray:\r
+       push ebp\r
+       mov ebp, esp\r
+       mov ecx, [ebp+12]       ; Get NArgs\r
+       mov edx, [ebp+16]\r
+\r
+.top:\r
+       mov eax, [edx+ecx*4-4]\r
+       push eax\r
+       loop .top\r
+       \r
+       mov eax, [ebp+8]\r
+       call eax\r
+       lea esp, [ebp]\r
+       pop ebp\r
+       ret\r
+\r
 [extern Proc_Clone]\r
 [extern Threads_Exit]\r
 [global SpawnTask]\r

UCC git Repository :: git.ucc.asn.au