mirror of
https://github.com/libretro/x86-assembly-cheat.git
synced 2026-11-07 12:47:59 -10:00
27 lines
368 B
NASM
27 lines
368 B
NASM
; # leave
|
|
|
|
; `leave` is equivalent to:
|
|
|
|
;mov esp, ebp
|
|
;pop ebp
|
|
|
|
; Which implies in the delocation of 2 dwords:
|
|
|
|
%include "lib/asm_io.inc"
|
|
|
|
ENTRY
|
|
|
|
mov eax, esp
|
|
enter 8, 0
|
|
sub eax, esp
|
|
ASSERT_EQ 12
|
|
|
|
; Modify 1st local var.
|
|
mov dword [ebp - 4], 1
|
|
; Modify 2nd local var.
|
|
mov dword [ebp - 8], 2
|
|
|
|
leave
|
|
|
|
EXIT
|