FEX/unittests/ASM/Primary/Primary_AE.asm
2020-05-29 23:38:27 -07:00

44 lines
617 B
NASM

%ifdef CONFIG
{
"RegData": {
"RAX": "0x1200",
"RDI": "0xE0000001"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, 0x0
mov [rdx + 8 * 2], rax
lea rdi, [rdx + 8 * 0]
cld
mov rax, 0x61
scasb
; cmp = 0x61 - 0x48 = 0x19
; 0: CF - 00000000
; 1: - 00000010
; 2: PF - 00000000
; 3: 0 - 00000000
; 4: AF - 00010000
; 5: 0 - 00000000
; 6: ZF - 00000000
; 7: SF - 00000000
; ================
; 00010010
; OF: LAHF doesn't load - 0
mov rax, 0
lahf
hlt