mirror of
https://github.com/libretro/x86-assembly-cheat.git
synced 2026-11-07 12:47:59 -10:00
37 lines
387 B
NASM
37 lines
387 B
NASM
; # pushf
|
|
|
|
; # pushfd
|
|
|
|
; # pushfq
|
|
|
|
; # popf
|
|
|
|
; Like pusha and popa, but for flags:
|
|
|
|
; - push/pop FLAGS
|
|
; - pushd/popd EFLAGS
|
|
|
|
|
|
%include "lib/asm_io.inc"
|
|
|
|
ENTRY
|
|
|
|
clc
|
|
mov eax, esp
|
|
pushf
|
|
sub eax, esp
|
|
; Needs 2 bytes, stack min 1 dword.
|
|
ASSERT_EQ 4
|
|
|
|
stc
|
|
popf
|
|
ASSERT_FLAG jnc
|
|
|
|
clc
|
|
pushfd
|
|
stc
|
|
popfd
|
|
ASSERT_FLAG jnc
|
|
|
|
EXIT
|