Good night...

This commit is contained in:
xolatile
2024-07-23 21:55:15 -04:00
parent a125c2be2b
commit a205f9a6bb
2 changed files with 16 additions and 20 deletions

View File

@ -392,7 +392,7 @@ void assemble (unsigned int count, unsigned int * array) {
} }
} }
text_entry_point = empty_store [0]; text_entry_point = empty_store [0];
for (index = 1; index < empty_holes; ++index) { for (index = 1; index < empty_holes; ++index) {
unsigned int set = 0; unsigned int set = 0;

View File

@ -2,7 +2,6 @@ fast procedure getchar
begin begin
nop mov eax 0 nop mov eax 0
nop mov edi 0 nop mov edi 0
nop mov esi r13d
nop mov edx 1 nop mov edx 1
nop syscall nop syscall
end procedure end procedure
@ -11,7 +10,6 @@ fast procedure putchar
begin begin
nop mov eax 1 nop mov eax 1
nop mov edi 1 nop mov edi 1
nop mov esi r13d
nop mov edx 1 nop mov edx 1
nop syscall nop syscall
end procedure end procedure
@ -23,30 +21,28 @@ unix program main
s8 line = '\n' s8 line = '\n'
begin begin
main_loop: main_loop:
nop mov r13d byte nop mov esi byte
nop fastcall getchar nop fastcall getchar
nop mov r10d eax // Store stop signal to r10. nop cmp eax 0
nop mov r15b [byte] // Store byte data to r15b. nop je main_skip
nop cmp r15b 144 // Compare byte to "nop" instruction. nop cmp [byte] 144 // Compare byte to "nop" instruction.
nop jne main_loop_skip // Skip if not "nop" instruction. nop jne main_loop_skip // Skip if not "nop" instruction.
nop mov r13d line nop mov esi line
nop fastcall putchar nop fastcall putchar
main_loop_skip: main_loop_skip:
nop mov r13d digits nop mov esi digits
nop machine 0x04ffc149 end machine # nop sar [byte] 4
nop add r13d r15d # nop add esi [byte]
nop fastcall putchar nop fastcall putchar
nop mov r13d digits nop mov esi digits
nop mov r15b [byte] nop and [byte] 15
nop and r15d 15 nop add esi [byte]
nop add r13d r15d
nop fastcall putchar nop fastcall putchar
nop mov r13d space nop mov esi space
nop fastcall putchar nop fastcall putchar
nop cmp r10d 0 // Compare stop signal to 0. nop jmp main_loop // Loop back if not equal.
nop jne main_loop // Loop back if not equal. main_skip:
nop mov r12d 1 nop mov esi line
nop mov r13d line
nop fastcall putchar nop fastcall putchar
nop exit 0 nop exit 0
end program end program