Files
FEX-Emu--FEX/unittests/32Bit_ASM/Primary/Primary_CF.asm
T
Ryan Houdek 28b3bc3508 unittests: Hotfix for older nasm
Newer nasm takes the size specifier for LEA, older ones do not
2021-08-22 21:59:57 -07:00

36 lines
322 B
NASM

%ifdef CONFIG
{
"RegData": {
"RAX": "0x1",
"RSP": "0xe0000010"
},
"Mode": "32BIT"
}
%endif
mov esp, 0xe0000010
lea ebx, [rel .end]
mov eax, 0x202
push eax ; RFLAGS
mov eax, 0x33
push eax ; CS
push ebx ; RIP
mov eax, -1
iretd
; Super fail
mov eax, 2
hlt
.end_fail:
mov eax, 0
hlt
.end:
mov eax, 1
hlt