Added wrong file...

This commit is contained in:
xolatile 2024-07-23 07:46:26 -04:00
parent f2983fdabf
commit 248bfc14cc
2 changed files with 110 additions and 32 deletions

110
test/major_stress_test.eax Normal file
View File

@ -0,0 +1,110 @@
fast procedure read_character
begin
mov eax 0
mov edi r12d
mov esi r13d
mov edx 1
syscall
end procedure
fast procedure write_character
begin
mov eax 1
mov edi r12d
mov esi r13d
mov edx 1
syscall
end procedure
fast procedure write_string
begin
mov eax 1
mov edi r12d
mov esi r13d
mov edx r14d
syscall
end procedure
fast procedure write_space
s8 space = " "
begin
mov eax 1
mov edi 1
mov esi space
mov edx 1
syscall
end procedure
fast procedure write_line_feed
s8 line_feed = "\n"
begin
mov eax 1
mov edi 1
mov esi line_feed
mov edx 1
syscall
end procedure
unix program main
s8 <> failure = "> nop file\n\0"
s8 <> digits = "0123456789abcdef"
s32 file = 0
s8 byte = 0
begin
pop r11
cmp r11 2
je skip
mov r12d 1
mov r13d failure
mov r14d 12
fastcall write_string
exit 1
skip:
pop r11
pop r11
mov eax 2
mov edi r11d
xor esi esi
xor edx edx
syscall
mov [file] eax
main_loop:
mov r12d [file]
mov r13d byte
call read_character
mov r10d eax
mov r15b [byte]
cmp r15b 144
jne main_loop_skip
fastcall write_line_feed
main_loop_skip:
mov r12d 1
mov r13d digits
sar r15d 4
add r13d r15d
call write_character
mov r12d 1
mov r13d digits
mov r15b [byte]
and r15d 15
add r13d r15d
fastcall write_character
fastcall write_space
cmp r10d 0
jne main_loop
fastcall write_line_feed
mov eax 3
mov edi [file]
syscall
exit 0
end program

View File

@ -1,32 +0,0 @@
7F 45 4C 46 02 01 01 03
00 00 00 00 00 00 00 00
02 00 3E 00 01 00 00 00
B0 00 40 00 00 00 00 00
40 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 40 00 38 00
02 00 40 00 00 00 00 00
01 00 00 00 05 00 00 00
00 00 00 00 00 00 00 00
00 00 40 00 00 00 00 00
00 00 40 00 00 00 00 00
D4 00 00 00 00 00 00 00
D4 00 00 00 00 00 00 00
00 10 00 00 00 00 00 00
01 00 00 00 06 00 00 00
D4 00 00 00 00 00 00 00
D4 10 40 00 00 00 00 00
D4 10 40 00 00 00 00 00
0C 00 00 00 00 00 00 00
0C 00 00 00 00 00 00 00
00 10 00 00 00 00 00 00
E9 16 00 00 00
B8 01 00 00 00
BF 01 00 00 00
BE D4 10 40 00
BA 0C 00 00 00
0F 05
B8 3C 00 00 00
BF 3C 00 00 00
0F 05
48 65 79 6F 20 77 6F 72 6C 64 21 0A