summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-07-23 15:53:07 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2020-07-23 15:53:07 +0200
commit8a42e9b49b2f3b3521d9158a7df4b056eac43a9b (patch)
treee351db5e694fc737d04df22614223417a8e36fbc
parentf7d14ea364fc7d592cfe6e5664b3bc7ad72b7804 (diff)
downloadcompilertests-8a42e9b49b2f3b3521d9158a7df4b056eac43a9b.tar.gz
compilertests-8a42e9b49b2f3b3521d9158a7df4b056eac43a9b.tar.bz2
added a simple ELF/i386 header example in FASM syntax
-rw-r--r--ecomp-c/tests/asm-i386/elf.asm9
1 files changed, 6 insertions, 3 deletions
diff --git a/ecomp-c/tests/asm-i386/elf.asm b/ecomp-c/tests/asm-i386/elf.asm
index 16f40e1..e23f61d 100644
--- a/ecomp-c/tests/asm-i386/elf.asm
+++ b/ecomp-c/tests/asm-i386/elf.asm
@@ -26,14 +26,17 @@ phdr:
dd 1 ; e_type: PT_LOAD
dd 0 ; e_offset
dd $$ ; p_vaddr
-dd 0 ; p_paddr
+dd $$ ; p_paddr
dd filesize ; p_filesz
dd filesize ; p_memsz
-dd 5 ; p_flags: Read & Execute
+dd 7 ; p_flags: Read, Write & Execute
dd 0x1000 ; p_align
phdrsize = $ - phdr
_start:
+mov eax, 42
+mov [a], eax
mov eax, 1
-mov ebx, 42
+mov ebx, [a]
int $80
+a: dd 43
filesize = $ - $$