add: elements of strings are now 1 byte, new print api

This commit is contained in:
2024-08-24 19:38:45 +02:00
parent 5e230e1e02
commit 37c4a37287
4 changed files with 25 additions and 20 deletions

View File

@@ -20,17 +20,6 @@ add a1, 8
jmp loop2
main:
mov a1, msg ; msg is a char *
loop:
cmp *a1, 0
jne 1
jmp show_arr
push *a1
push 1
call put
add a1, 8 ; little ptr theory here, as the stack is of type long long
; to go to the next value you have to add sizeof(long long) to the ptr
; so you need to add 8
jmp loop
push msg
call print
jmp show_arr