diff options
author | Christian Cunningham <cc@localhost> | 2022-01-31 19:05:50 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-01-31 19:05:50 -0700 |
commit | a1f49718aee378fa075303c86106309091d56b80 (patch) | |
tree | daa43fe9db527b69bc3b5e9cd967e6e5de5f5e29 /src/exceptions/data.S | |
parent | 09d5025fc34644a6e04380a61da15ba5d8e3f775 (diff) |
Break exceptions off to own files
Diffstat (limited to 'src/exceptions/data.S')
-rw-r--r-- | src/exceptions/data.S | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/exceptions/data.S b/src/exceptions/data.S new file mode 100644 index 0000000..2268de5 --- /dev/null +++ b/src/exceptions/data.S @@ -0,0 +1,29 @@ +.section ".text.exceptions" +.globl data +data: + cpsid aif + stmfd sp!, {r0-r12,lr} + mov r4, lr + mov r0, #0 + mov r1, #15 + ldr r2, =data_msg + bl draw_string + // Output return address + mov r0, #13 + mov r1, #15 + mov r2, r4 + sub r2, #8 + bl draw_hex32 + mov r0, #22 + mov r1, #15 + ldr r2, [r4, #-8] + bl draw_hex32 + mov r0, #32 + mov r1, #15 + mrs r2, spsr + bl draw_hex32 + ldmfd sp!, {r0-r12,lr} + subs pc, lr, #4 // Should be 8 once I can actually handle the abort + +.section .data +data_msg: .asciz "Data Handler" |