You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case you would like to integrate this to your library.
Not exactly a syscall since it's calling ntdll!Wow64SystemServiceCall .
I will adapt to native x86 if there is any interest at all.
#include "textflag.h"
#define maxargs 16
//func Syscall(callid uint32,tramboline uintptr, argh ...uintptr) (uint32, error)
TEXT ·bpSyscall(SB),NOSPLIT,$0
MOVL callid+0(FP), DX
MOVL tramboline+4(FP), BX
MOVL argh+8(FP), SI
// SetLastError(0).
MOVL $0, 0x34(FS)
// Copy args to the stack.
MOVL SP, BP
PUSHL AX
MOVL argh_len+0x0c(FP), CX // words
MOVL CX, AX
SALL $2, AX
SUBL AX, SP // room for args
POPL AX
MOVL SP, DI
CLD
REP; MOVSL
// Call stdcall or cdecl function.
// DI SI BP BX are preserved, SP is not
MOVL DX,AX
CALL BX
// Return result.
MOVL AX, errcode+0x14(FP)
RET
The text was updated successfully, but these errors were encountered:
In case you would like to integrate this to your library.
Not exactly a syscall since it's calling ntdll!Wow64SystemServiceCall .
I will adapt to native x86 if there is any interest at all.
The text was updated successfully, but these errors were encountered: