mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-17 19:00:39 +02:00
asm_tests: Add 32-bit CMPS/SCAS tests without address size override
This commit is contained in:
1 parent
5ee190a41e
commit
9d965f94de
22 files changed
+857
-2
No files matched your search
@@ -30,7 +30,7 @@ foreach(ASM_SRC ${ASM_SOURCES})
|
||||
add_custom_command(OUTPUT ${TMP_FILE}
|
||||
DEPENDS "${ASM_SRC}"
|
||||
COMMAND "cp" ARGS "${ASM_SRC}" "${TMP_FILE}"
|
||||
COMMAND "sed" ARGS "-i" "-e" "\'1s;^;BITS 32\\norg 10000h\\nmov eax, 0x17\\nmov ds, ax\\n;\'" "-e" "\'\$\$a\\ret\\n\'" "${TMP_FILE}"
|
||||
COMMAND "sed" ARGS "-i" "-e" "\'1s;^;BITS 32\\norg 10000h\\nmov eax, 0x17\\nmov ds, ax\\nmov es, ax\\n;\'" "-e" "\'\$\$a\\ret\\n\'" "${TMP_FILE}"
|
||||
)
|
||||
|
||||
set(OUTPUT_NAME "${OUTPUT_ASM_FOLDER}/${ASM_NAME}.bin")
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x10011"
|
||||
"RAX": "0x10013"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
; Preamble (32Bit_ASM/CMakeLists.txt) sets ES and changes expectation.
|
||||
; Originally 0x10011, now 0x10013.
|
||||
|
||||
mov esp, 0xe0000010
|
||||
|
||||
; This is a common pattern in 32-bit PIE code.
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x8300",
|
||||
"RDI": "0xE0000009",
|
||||
"RSI": "0xE0000001"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x47
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x61
|
||||
mov [edx + 8 * 1], eax
|
||||
|
||||
lea edi, [edx + 8 * 1]
|
||||
lea esi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
cmpsb
|
||||
; cmp = 0x47 - 0x61 = 0xE6
|
||||
; 0: CF - 00000001
|
||||
; 1: - 00000010
|
||||
; 2: PF - 00000000
|
||||
; 3: 0 - 00000000
|
||||
; 4: AF - 00000000
|
||||
; 5: 0 - 00000000
|
||||
; 6: ZF - 00000000
|
||||
; 7: SF - 10000000
|
||||
; ================
|
||||
; 10000011
|
||||
; OF: LAHF doesn't load - 0
|
||||
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,53 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x0200",
|
||||
"RCX": "0x5",
|
||||
"RDX": "0x0",
|
||||
"RDI": "0xE0000005",
|
||||
"RSI": "0xE0000015"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
%macro copy 3
|
||||
; Dest, Src, Size
|
||||
mov edi, %1
|
||||
mov esi, %2
|
||||
mov ecx, %3
|
||||
|
||||
mov eax, 0x17
|
||||
mov es, eax
|
||||
mov ds, eax
|
||||
|
||||
cld
|
||||
rep movsb
|
||||
%endmacro
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
lea ebx, [edx + 8 * 0]
|
||||
lea ebp, .StringOne
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea ebx, [edx + 8 * 2]
|
||||
lea ebp, .StringTwo
|
||||
copy ebx, ebp, 14
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
lea esi, [edx + 8 * 2]
|
||||
|
||||
cld
|
||||
mov ecx, 10
|
||||
repe cmpsb
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
mov edx, 0
|
||||
sete dl
|
||||
|
||||
hlt
|
||||
|
||||
.StringOne: db "TestString\0"
|
||||
.StringTwo: db "TestUnmatched\0"
|
||||
@@ -0,0 +1,53 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x4600",
|
||||
"RCX": "0x3",
|
||||
"RDX": "0x1",
|
||||
"RDI": "0xE0000007",
|
||||
"RSI": "0xE0000017"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
%macro copy 3
|
||||
; Dest, Src, Size
|
||||
mov edi, %1
|
||||
mov esi, %2
|
||||
mov ecx, %3
|
||||
|
||||
mov eax, 0x17
|
||||
mov es, eax
|
||||
mov ds, eax
|
||||
|
||||
cld
|
||||
rep movsb
|
||||
%endmacro
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
lea ebx, [edx + 8 * 0]
|
||||
lea ebp, .StringOne
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea ebx, [edx + 8 * 2]
|
||||
lea ebp, .StringTwo
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
lea esi, [edx + 8 * 2]
|
||||
|
||||
cld
|
||||
mov ecx, 10
|
||||
repne cmpsb
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
mov edx, 0
|
||||
sete dl
|
||||
|
||||
hlt
|
||||
|
||||
.StringOne: db "StringTest\0"
|
||||
.StringTwo: db "UnmatcTest\0"
|
||||
@@ -0,0 +1,53 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x4600",
|
||||
"RCX": "0x0",
|
||||
"RDX": "0x1",
|
||||
"RDI": "0xE000000A",
|
||||
"RSI": "0xE000001A"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
%macro copy 3
|
||||
; Dest, Src, Size
|
||||
mov edi, %1
|
||||
mov esi, %2
|
||||
mov ecx, %3
|
||||
|
||||
mov eax, 0x17
|
||||
mov es, eax
|
||||
mov ds, eax
|
||||
|
||||
cld
|
||||
repne movsb
|
||||
%endmacro
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
lea ebx, [edx + 8 * 0]
|
||||
lea ebp, .StringOne
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea ebx, [edx + 8 * 2]
|
||||
lea ebp, .StringTwo
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
lea esi, [edx + 8 * 2]
|
||||
|
||||
cld
|
||||
mov ecx, 10
|
||||
repe cmpsb
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
mov edx, 0
|
||||
sete dl
|
||||
|
||||
hlt
|
||||
|
||||
.StringOne: db "TestString\0"
|
||||
.StringTwo: db "TestString\0"
|
||||
@@ -0,0 +1,53 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x4600",
|
||||
"RCX": "0x0",
|
||||
"RDX": "0x1",
|
||||
"RDI": "0xE000000A",
|
||||
"RSI": "0xE000001A"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
%macro copy 3
|
||||
; Dest, Src, Size
|
||||
mov edi, %1
|
||||
mov esi, %2
|
||||
mov ecx, %3
|
||||
|
||||
mov eax, 0x17
|
||||
mov es, eax
|
||||
mov ds, eax
|
||||
|
||||
cld
|
||||
rep movsb
|
||||
%endmacro
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
lea ebx, [edx + 8 * 0]
|
||||
lea ebp, .StringOne
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea ebx, [edx + 8 * 2]
|
||||
lea ebp, .StringTwo
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
lea esi, [edx + 8 * 2]
|
||||
|
||||
cld
|
||||
mov ecx, 10
|
||||
repe cmpsb
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
mov edx, 0
|
||||
sete dl
|
||||
|
||||
hlt
|
||||
|
||||
.StringOne: db "TestString\0"
|
||||
.StringTwo: db "TestString\0"
|
||||
@@ -0,0 +1,53 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x0600",
|
||||
"RCX": "0x5",
|
||||
"RDX": "0x0",
|
||||
"RDI": "0xE0000005",
|
||||
"RSI": "0xE0000015"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
%macro copy 3
|
||||
; Dest, Src, Size
|
||||
mov edi, %1
|
||||
mov esi, %2
|
||||
mov ecx, %3
|
||||
|
||||
mov eax, 0x17
|
||||
mov es, eax
|
||||
mov ds, eax
|
||||
|
||||
cld
|
||||
rep movsb
|
||||
%endmacro
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
lea ebx, [edx + 8 * 0]
|
||||
lea ebp, .StringOne
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea ebx, [edx + 8 * 2]
|
||||
lea ebp, .StringTwo
|
||||
copy ebx, ebp, 14
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
lea esi, [edx + 8 * 2]
|
||||
|
||||
cld
|
||||
mov ecx, 10
|
||||
repe cmpsb
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
mov edx, 0
|
||||
sete dl
|
||||
|
||||
hlt
|
||||
|
||||
.StringOne: db "TestString\0"
|
||||
.StringTwo: db "Test\0"
|
||||
@@ -0,0 +1,53 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x8300",
|
||||
"RCX": "0x9",
|
||||
"RDX": "0x0",
|
||||
"RDI": "0xE000000C",
|
||||
"RSI": "0xE000001C"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
%macro copy 3
|
||||
; Dest, Src, Size
|
||||
mov edi, %1
|
||||
mov esi, %2
|
||||
mov ecx, %3
|
||||
|
||||
mov eax, 0x17
|
||||
mov es, eax
|
||||
mov ds, eax
|
||||
|
||||
cld
|
||||
rep movsb
|
||||
%endmacro
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
lea ebx, [edx + 8 * 0]
|
||||
lea ebp, .StringOne
|
||||
copy ebx, ebp, 14
|
||||
|
||||
lea ebx, [edx + 8 * 2]
|
||||
lea ebp, .StringTwo
|
||||
copy ebx, ebp, 14
|
||||
|
||||
lea edi, [edx + 8 * 0 + 13]
|
||||
lea esi, [edx + 8 * 2 + 13]
|
||||
|
||||
std
|
||||
mov ecx, 10
|
||||
repe cmpsb
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
mov edx, 0
|
||||
sete dl
|
||||
|
||||
hlt
|
||||
|
||||
.StringOne: db "\0\0\0\0TestString"
|
||||
.StringTwo: db "\0TestUnmatched"
|
||||
@@ -0,0 +1,53 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x4600",
|
||||
"RCX": "0x0",
|
||||
"RDX": "0x1",
|
||||
"RDI": "0xDFFFFFFF",
|
||||
"RSI": "0xE000000F"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
%macro copy 3
|
||||
; Dest, Src, Size
|
||||
mov edi, %1
|
||||
mov esi, %2
|
||||
mov ecx, %3
|
||||
|
||||
mov eax, 0x17
|
||||
mov es, eax
|
||||
mov ds, eax
|
||||
|
||||
cld
|
||||
rep movsb
|
||||
%endmacro
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
lea ebx, [edx + 8 * 0]
|
||||
lea ebp, .StringOne
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea ebx, [edx + 8 * 2]
|
||||
lea ebp, .StringTwo
|
||||
copy ebx, ebp, 11
|
||||
|
||||
lea edi, [edx + 8 * 0 + 10]
|
||||
lea esi, [edx + 8 * 2 + 10]
|
||||
|
||||
std
|
||||
mov ecx, 11
|
||||
repe cmpsb
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
mov edx, 0
|
||||
sete dl
|
||||
|
||||
hlt
|
||||
|
||||
.StringOne: db "\0TestString"
|
||||
.StringTwo: db "\0TestString"
|
||||
@@ -0,0 +1,40 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x1200",
|
||||
"RDI": "0xE0000007",
|
||||
"RSI": "0xDFFFFFFF"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x61
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x47
|
||||
mov [edx + 8 * 1], eax
|
||||
|
||||
lea edi, [edx + 8 * 1]
|
||||
lea esi, [edx + 8 * 0]
|
||||
|
||||
std
|
||||
cmpsb
|
||||
; cmp = 0x47 - 0x61 = 0xE6
|
||||
; 0: CF - 00000001
|
||||
; 1: - 00000010
|
||||
; 2: PF - 00000000
|
||||
; 3: 0 - 00000000
|
||||
; 4: AF - 00000000
|
||||
; 5: 0 - 00000000
|
||||
; 6: ZF - 00000000
|
||||
; 7: SF - 10000000
|
||||
; ================
|
||||
; 10000011
|
||||
; OF: LAHF doesn't load - 0
|
||||
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,39 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x1600",
|
||||
"RDI": "0xE000000C",
|
||||
"RSI": "0xE0000004"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x61626364
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
|
||||
lea edi, [edx + 8 * 1]
|
||||
lea esi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
cmpsd
|
||||
; cmp = 0x55565758 - 0x61626364 = 0xF3F3F3F4
|
||||
; 0: CF - 00000001
|
||||
; 1: - 00000010
|
||||
; 2: PF - 00000000
|
||||
; 3: 0 - 00000000
|
||||
; 4: AF - 00000000
|
||||
; 5: 0 - 00000000
|
||||
; 6: ZF - 00000000
|
||||
; 7: SF - 10000000
|
||||
; ================
|
||||
; 10000011
|
||||
; OF: LAHF doesn't load - 0
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,39 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x1600",
|
||||
"RDI": "0xE0000004",
|
||||
"RSI": "0xDFFFFFFC"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x61626364
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
|
||||
lea edi, [edx + 8 * 1]
|
||||
lea esi, [edx + 8 * 0]
|
||||
|
||||
std
|
||||
cmpsd
|
||||
; cmp = 0x55565758 - 0x61626364 = 0xF3F3F3F4
|
||||
; 0: CF - 00000001
|
||||
; 1: - 00000010
|
||||
; 2: PF - 00000000
|
||||
; 3: 0 - 00000000
|
||||
; 4: AF - 00000000
|
||||
; 5: 0 - 00000000
|
||||
; 6: ZF - 00000000
|
||||
; 7: SF - 10000000
|
||||
; ================
|
||||
; 10000011
|
||||
; OF: LAHF doesn't load - 0
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,40 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x1200",
|
||||
"RDI": "0xE000000A",
|
||||
"RSI": "0xE0000002"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x6162
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x4546
|
||||
mov [edx + 8 * 1], eax
|
||||
|
||||
lea edi, [edx + 8 * 1]
|
||||
lea esi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
cmpsw
|
||||
; cmp = 0x4546 - 0x6162 = 0xE3E4
|
||||
; 0: CF - 00000001
|
||||
; 1: - 00000010
|
||||
; 2: PF - 00000100
|
||||
; 3: 0 - 00000000
|
||||
; 4: AF - 00000000
|
||||
; 5: 0 - 00000000
|
||||
; 6: ZF - 00000000
|
||||
; 7: SF - 10000000
|
||||
; ================
|
||||
; 10000111
|
||||
; OF: LAHF doesn't load - 0
|
||||
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,40 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x1200",
|
||||
"RDI": "0xE0000006",
|
||||
"RSI": "0xDFFFFFFE"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x6162
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x4546
|
||||
mov [edx + 8 * 1], eax
|
||||
|
||||
lea edi, [edx + 8 * 1]
|
||||
lea esi, [edx + 8 * 0]
|
||||
|
||||
std
|
||||
cmpsw
|
||||
; cmp = 0x4546 - 0x6162 = 0xE3E4
|
||||
; 0: CF - 00000001
|
||||
; 1: - 00000010
|
||||
; 2: PF - 00000100
|
||||
; 3: 0 - 00000000
|
||||
; 4: AF - 00000000
|
||||
; 5: 0 - 00000000
|
||||
; 6: ZF - 00000000
|
||||
; 7: SF - 10000000
|
||||
; ================
|
||||
; 10000111
|
||||
; OF: LAHF doesn't load - 0
|
||||
|
||||
mov eax, 0
|
||||
lahf
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,45 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x1200",
|
||||
"RDI": "0xE0000001"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x45464748
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x41424344
|
||||
mov [edx + 8 * 0 + 4], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
mov eax, 0x51525354
|
||||
mov [edx + 8 * 1 + 4], eax
|
||||
mov eax, 0x0
|
||||
mov [edx + 8 * 2], eax
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
mov eax, 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 eax, 0
|
||||
lahf
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RCX": "5",
|
||||
"RDI": "0xE0000003"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x45466161
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x41424344
|
||||
mov [edx + 8 * 0 + 4], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
mov eax, 0x51525354
|
||||
mov [edx + 8 * 1 + 4], eax
|
||||
mov eax, 0x0
|
||||
mov [edx + 8 * 2], eax
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
mov eax, 0x61
|
||||
mov ecx, 8
|
||||
cmp eax, 0x61
|
||||
|
||||
rep scasb
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RCX": "1",
|
||||
"RDI": "0xE0000007"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x45464748
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x41614344
|
||||
mov [edx + 8 * 0 + 4], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
mov eax, 0x51525354
|
||||
mov [edx + 8 * 1 + 4], eax
|
||||
mov eax, 0x0
|
||||
mov [edx + 8 * 2], eax
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
mov eax, 0x61
|
||||
mov ecx, 8
|
||||
cmp eax, 0
|
||||
|
||||
repne scasb
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RCX": "5",
|
||||
"RDI": "0xE000000D"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x45464748
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x41424344
|
||||
mov [edx + 8 * 0 + 4], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
mov eax, 0x51615354
|
||||
mov [edx + 8 * 1 + 4], eax
|
||||
mov eax, 0x0
|
||||
mov [edx + 8 * 2], eax
|
||||
|
||||
lea edi, [edx + 8 * 2]
|
||||
|
||||
std
|
||||
mov eax, 0x61
|
||||
mov ecx, 8
|
||||
cmp eax, 0
|
||||
|
||||
repne scasb
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RCX": "7",
|
||||
"RDI": "0xE000000F"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x45466161
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x41424344
|
||||
mov [edx + 8 * 0 + 4], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
mov eax, 0x51525354
|
||||
mov [edx + 8 * 1 + 4], eax
|
||||
mov eax, 0x0
|
||||
mov [edx + 8 * 2], eax
|
||||
|
||||
lea edi, [edx + 8 * 2]
|
||||
|
||||
std
|
||||
mov eax, 0x61
|
||||
mov ecx, 8
|
||||
cmp eax, 0x61
|
||||
|
||||
rep scasb
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RCX": "6",
|
||||
"RDI": "0xE0000008"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x61626364
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x41424344
|
||||
mov [edx + 8 * 0 + 4], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
mov eax, 0x51525354
|
||||
mov [edx + 8 * 1 + 4], eax
|
||||
mov eax, 0x0
|
||||
mov [edx + 8 * 2], eax
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
mov eax, 0x61626364
|
||||
mov ecx, 8
|
||||
cmp eax, 0x61626364
|
||||
|
||||
rep scasd
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RCX": "6",
|
||||
"RDI": "0xE0000004"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov edx, 0xe0000000
|
||||
|
||||
mov eax, 0x45466162
|
||||
mov [edx + 8 * 0], eax
|
||||
mov eax, 0x41424344
|
||||
mov [edx + 8 * 0 + 4], eax
|
||||
mov eax, 0x55565758
|
||||
mov [edx + 8 * 1], eax
|
||||
mov eax, 0x51525354
|
||||
mov [edx + 8 * 1 + 4], eax
|
||||
mov eax, 0x0
|
||||
mov [edx + 8 * 2], eax
|
||||
|
||||
lea edi, [edx + 8 * 0]
|
||||
|
||||
cld
|
||||
mov eax, 0x6162
|
||||
mov ecx, 8
|
||||
cmp eax, 0x6162
|
||||
|
||||
rep scasw
|
||||
|
||||
hlt
|
||||
Reference in new issue
Block a user