2022-02-12 04:41:58 +01:00
|
|
|
; debug routines
|
|
|
|
|
|
|
|
; print a string to the terminal
|
|
|
|
; inputs:
|
|
|
|
; r0: pointer to null-terminated string
|
|
|
|
; outputs:
|
|
|
|
; none
|
|
|
|
debug_print:
|
2022-06-24 00:42:56 +02:00
|
|
|
push r0
|
2022-02-12 04:41:58 +01:00
|
|
|
push r1
|
|
|
|
debug_print_loop:
|
|
|
|
mov r1, 0x00000000
|
|
|
|
out r1, [r0]
|
|
|
|
inc r0
|
|
|
|
cmp.8 [r0], 0x00
|
|
|
|
ifnz jmp debug_print_loop
|
|
|
|
pop r1
|
2022-06-24 00:42:56 +02:00
|
|
|
pop r0
|
|
|
|
ret
|