aboutsummaryrefslogtreecommitdiff
path: root/ia32/elf
diff options
context:
space:
mode:
Diffstat (limited to 'ia32/elf')
-rw-r--r--ia32/elf/begin.sts129
-rw-r--r--ia32/elf/end.sts21
-rw-r--r--ia32/elf/syscall.sts41
3 files changed, 0 insertions, 191 deletions
diff --git a/ia32/elf/begin.sts b/ia32/elf/begin.sts
deleted file mode 100644
index 8dab930..0000000
--- a/ia32/elf/begin.sts
+++ /dev/null
@@ -1,129 +0,0 @@
-?create ?? _code_segment
-_code_segment ?choose
-
-# 08048000 ?org
-# 4 ?size
-# 0 ?endianness
-
-?create ?? _data_segment
-_data_segment ?choose
-
-# 09048000 ?org
-# 4 ?size
-# 0 ?endianness
-
-_code_segment ?choose
-
-; ELF header
-; EI_MAG - ELF magic number
-# 7f ?' # 45 ?' # 4c ?' # 46 ?'
-; EI_CLASS - 32-bit format
-# 1 ?'
-; EI_DATA - little-endiann
-# 1 ?'
-; EI_VERSION - current ELF header version
-# 1 ?'
-; EI_OSABI - Linux ABI
-# 3 ?'
-; EI_ABIVERSION - none
-# 0 ?'
-; EI_PAD - padding
-# 7 ?res
-; Executable file type
-# 2 ?2.
-; IA-32 architecture
-# 3 ?2.
-; ELF version
-# 1 ?4.
-; Entry point
-?$ ?? _elf_entry
-# 0 ?4.
-; Program headers offset
-# 34 ?4.
-; Section headers offset
-# 0 ?4.
-; Extra flags
-# 0 ?4.
-; ELF header size
-# 34 ?2.
-; Program header size
-# 20 ?2.
-; Number of program headers
-# 2 ?2.
-; Section header size
-# 28 ?2.
-; Number of section headers
-# 0 ?2.
-; Section name section index
-# 0 ?2.
-
-; ELF CODE PROGRAM HEADER
-; Segment type
-# 1 ?4.
-; Segment offset
-# 0 ?4.
-; Segment virtual address
-?$$ ?4.
-; Segment physical address
-?$$ ?4.
-; Segment file size
-?$ ?? _code_segment_file_size
-# 0 ?4.
-; Segment memory size
-?$ ?? _code_segment_memory_size
-# 0 ?4.
-; Segment flags
-# 5 ?4.
-; Segment alignment
-# 1000 ?4.
-
-; ELF DATA PROGRAM HEADER
-; Segment type
-# 1 ?4.
-; Segment offset
-?$ ?? _data_segment_offset
-# 0 ?4.
-; Segment virtual address
-_data_segment ?choose
-?$$
-_code_segment ?choose
-?4.
-; Segment physical address
-_data_segment ?choose
-?$$
-_code_segment ?choose
-?4.
-; Segment file size
-?$ ?? _data_segment_file_size
-# 0 ?4.
-; Segment memory size
-?$ ?? _data_segment_memory_size
-# 0 ?4.
-; Segment flags
-# 6 ?4.
-; Segment alignment
-# 1000 ?4.
-
-; Return stack
-_data_segment ?choose
-1000 ?res
-?$ ?dup ?? _return_stack
-_code_segment ?choose
-
-; PROGRAM ENTRY CODE
-?$ _elf_entry ?!
-; mov ebp, _return_stack
-# bd ?'
-_return_stack ?.
-; mov esi, _threaded_code_entry
-# be ?'
-?$ ?? _threaded_code_entry
-# 0 ?.
-; lodsd
-# ad ?'
-; jmp dword [eax]
-# ff ?' # 20 ?'
-
-module ia32/ia32.sts
-module ia32/elf/syscall.sts
-module common/common.sts
diff --git a/ia32/elf/end.sts b/ia32/elf/end.sts
deleted file mode 100644
index 7c80eec..0000000
--- a/ia32/elf/end.sts
+++ /dev/null
@@ -1,21 +0,0 @@
-; Code segment alignment
-# 1000 ?$ # 1000 ?mod ?- ?dup ?res
-
-; Code segment ELF sizes
-?$ ?$$ ?- _code_segment_file_size ?!
-?$ ?$$ ?- _code_segment_memory_size ?!
-
-; Data segment ELF offset
-?$ ?$$ ?-
-_code_segment ?choose
-_data_segment_offset ?!
-
-; Data segment ELF sizes
-_data_segment ?choose
-?$ ?$$ ?-
-_code_segment ?choose
-_data_segment_file_size ?!
-_data_segment ?choose
-?$ ?$$ ?-
-_code_segment ?choose
-_data_segment_memory_size ?!
diff --git a/ia32/elf/syscall.sts b/ia32/elf/syscall.sts
deleted file mode 100644
index 3acfef2..0000000
--- a/ia32/elf/syscall.sts
+++ /dev/null
@@ -1,41 +0,0 @@
-defasm sys_exit
- # b8 ?' # 1 ?. ; mov eax, 1
- # 31 ?' # db ?' ; xor ebx, ebx
- # cd ?' # 80 ?' ; int 0x80
-; no need in next since this is the last instruction
-
-_data_segment ?choose
- ?$ ?? _iobuf # 0 ?.
-_code_segment ?choose
-
-defasm sys_read
- # b8 ?' # 3 ?. ; mov eax, 3
- # 31 ?' # db ?' ; xor ebx, ebx
- # b9 ?' _iobuf ?. ; mov ecx, _iobuf
- # ba ?' # 1 ?. ; mov edx, 1
- # cd ?' # 80 ?' ; int 0x80
- # 31 ?' # db ?' ; xor ebx, ebx
- # 8a ?' # 1d ?' _iobuf ?. ; mov bl, [_iobuf]
- # 53 ?' ; push ebx
- # 50 ?' ; push eax
-next
-
-defasm sys_write
- # 58 ?' ; pop eax
- # a2 ?' _iobuf ?. ; mov [_iobuf], al
- # b8 ?' # 4 ?. ; mov eax, 4
- # bb ?' # 1 ?. ; mov ebx, 1
- # b9 ?' _iobuf ?. ; mov ecx, _iobuf
- # ba ?' # 1 ?. ; mov edx, 1
- # cd ?' # 80 ?' ; int 0x80
-next
-
-defasm sys_write_err
- # 58 ?' ; pop eax
- # a2 ?' _iobuf ?. ; mov [_iobuf], al
- # b8 ?' # 4 ?. ; mov eax, 4
- # bb ?' # 2 ?. ; mov ebx, 2
- # b9 ?' _iobuf ?. ; mov ecx, _iobuf
- # ba ?' # 1 ?. ; mov edx, 1
- # cd ?' # 80 ?' ; int 0x80
-next