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:
|
|
|
|
brk
|
|
|
|
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
|
|
|
|
call invoke_monitor
|
|
|
|
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
|