fox32rom/panic.asm

19 lines
367 B
NASM
Raw Normal View History

2022-03-19 05:59:51 +01:00
; panic routines
2022-06-24 00:42:56 +02:00
; panic invoke the monitor
2022-03-19 05:59:51 +01:00
; inputs:
; r0: pointer to null-terminated string, or zero for none
; outputs:
; none, does not return
panic:
push r0
2022-03-19 05:59:51 +01:00
cmp r0, 0
2022-05-22 01:27:29 +02:00
ifz mov r0, panic_string
2022-03-19 05:59:51 +01:00
call debug_print
2022-06-24 00:42:56 +02:00
call print_string_to_monitor
pop r0
brk
2022-06-24 00:42:56 +02:00
rjmp 0
2022-03-19 05:59:51 +01:00
2022-06-24 00:42:56 +02:00
panic_string: data.str "Unspecified panic occurred!" data.8 10 data.8 0