fix: root: pass a valid cptr

This commit is contained in:
Paul Pan 2024-06-17 00:43:42 +08:00
parent 7d3cef6f80
commit 8bf63bfb5d

View File

@ -10,8 +10,11 @@ _start:
la t0, msg
.loop:
lb a2, 0(t0)
beqz a2, _start # print forever
syscall (1<<12 | 1), 1 # see uapi/syscall.rs
beqz a2, _start
# see uapi/syscall.rs
# msg: label = DebugPutChar, length = 3
# ptr: self-referential to cspace, just to create a valid cptr
syscall (1<<12 | 3), 0x0202020202020202
addi t0, t0, 1
j .loop