fox32rom: Add a small debug routine for printing to the terminal
This commit is contained in:
parent
e21aae6d08
commit
fee7b1fa64
17
debug.asm
Normal file
17
debug.asm
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
; debug routines
|
||||||
|
|
||||||
|
; print a string to the terminal
|
||||||
|
; inputs:
|
||||||
|
; r0: pointer to null-terminated string
|
||||||
|
; outputs:
|
||||||
|
; none
|
||||||
|
debug_print:
|
||||||
|
push r1
|
||||||
|
debug_print_loop:
|
||||||
|
mov r1, 0x00000000
|
||||||
|
out r1, [r0]
|
||||||
|
inc r0
|
||||||
|
cmp.8 [r0], 0x00
|
||||||
|
ifnz jmp debug_print_loop
|
||||||
|
pop r1
|
||||||
|
ret
|
1
main.asm
1
main.asm
|
@ -164,6 +164,7 @@ mount_boot_disk:
|
||||||
; code
|
; code
|
||||||
#include "boot.asm"
|
#include "boot.asm"
|
||||||
#include "background.asm"
|
#include "background.asm"
|
||||||
|
#include "debug.asm"
|
||||||
#include "overlay.asm"
|
#include "overlay.asm"
|
||||||
#include "memory.asm"
|
#include "memory.asm"
|
||||||
#include "menu.asm"
|
#include "menu.asm"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user