Reputation: 9
I compile the following code snippet in FASM 64bit for Windows 10, I generate my BIN, I import it in another language that runs this with CallWindProc, it works great when it is for a function with 4 parameters, what should I add to Can I call a function with 12 or more parameters, for example? I appreciate any suggestions.
push rbp
mov rbp, rsp
sub rsp, 20h
mov r9, 04A4B404h ; param_04 - 04A4B404h
mov r8, 03A3B303h ; param_03 - 03A3B303h
mov rdx, 02A2B202h ; param_02 - 02A2B202h
mov rcx, 01A1B101h ; param_01 - 01A1B101h
mov rax, 00A0B000h ; ptr funtion - 00A0B000h
call rax
add rsp, 20h
pop rbp
retn
Try this but it doesn't work
mov rax, 05A5B505h ; param_05 - 05A5B505h
mov rsp, rax
Upvotes: 0
Views: 47