fox32rom/panic.asm

19 lines
327 B
NASM
Raw Normal View History

2022-03-19 05:59:51 +01:00
; 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