This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/invoker_asm.asm
tupoy-ya 1087146e56
refactor!: Replace premake5 with CMake. (#551)
Co-authored-by: tupoy-ya <tupoy-ya@users.noreply.github.com>
2022-11-08 21:08:58 +00:00

21 lines
340 B
NASM

.DATA
return_address dq 0
real_rbx dq 0
.CODE
_call_asm PROC
mov real_rbx, rbx
mov r9, [rsp]
mov return_address, r9
lea rbx, _ret_asm
mov [rsp], r8
jmp rdx
_call_asm ENDP
_ret_asm PROC
mov rbx, real_rbx
mov rcx, return_address
jmp rcx
_ret_asm ENDP
END