19 lines
327 B
NASM
19 lines
327 B
NASM
|
; panic routines
|
||
|
|
||
|
; panic and hang
|
||
|
; inputs:
|
||
|
; r0: pointer to null-terminated string, or zero for none
|
||
|
; outputs:
|
||
|
; none, does not return
|
||
|
panic:
|
||
|
icl
|
||
|
brk
|
||
|
cmp r0, 0
|
||
|
ifnz mov r0, panic_string
|
||
|
call debug_print
|
||
|
panic_loop:
|
||
|
jmp panic_loop
|
||
|
halt
|
||
|
|
||
|
panic_string: data.str "Panic occurred!" data.8 10 data.8 0
|