add: elements of strings are now 1 byte, new print api
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user