X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fstart.asm;h=d9a1e500ea6d8316cf28c38e6208023dc2bc122c;hb=e617614d9e5ca900649d584524eacef768b1f1b9;hp=b1884aeff516ee77c5d897a2a955ac35d8d35c4a;hpb=88ad2daf974ce4c4c770307546a9b4968c6183c2;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/start.asm b/Kernel/arch/x86/start.asm index b1884aef..d9a1e500 100644 --- a/Kernel/arch/x86/start.asm +++ b/Kernel/arch/x86/start.asm @@ -148,6 +148,26 @@ GetEIP: mov eax, [esp] ret +; int CallWithArgArray(void *Ptr, int NArgs, Uint *Args) +; Call a function passing the array as arguments +[global CallWithArgArray] +CallWithArgArray: + push ebp + mov ebp, esp + mov ecx, [ebp+12] ; Get NArgs + mov edx, [ebp+16] + +.top: + mov eax, [edx+ecx*4-4] + push eax + loop .top + + mov eax, [ebp+8] + call eax + lea esp, [ebp] + pop ebp + ret + [extern Proc_Clone] [extern Threads_Exit] [global SpawnTask]