diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-14 15:40:49 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-14 15:40:49 -0700 |
commit | adc92f49dca2951b04d3ea566a2e8134e9a891a7 (patch) | |
tree | de80f29c89586edb7779c4e7ff3a7bce05b8def0 /317abort.subx | |
parent | 69e477b12bf1e3a5ccfb4833bcaa34326a4a42d4 (diff) | |
download | mu-adc92f49dca2951b04d3ea566a2e8134e9a891a7.tar.gz |
.
Move abort to SubX. We'll need to do some unsafe stuff to display the call stack here.
Diffstat (limited to '317abort.subx')
-rw-r--r-- | 317abort.subx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/317abort.subx b/317abort.subx new file mode 100644 index 00000000..9d196ed8 --- /dev/null +++ b/317abort.subx @@ -0,0 +1,15 @@ +# Dump a stack trace when you abort. + +== code + +abort: # e: (addr array byte) + # . prologue + 55/push-ebp + 89/<- %ebp 4/r32/esp + # + (set-cursor-position-on-real-screen 0 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+8) 0xf 0xc) # 0/real-screen, 0xf/fg=white, 0xc/bg=red + # crash + { + eb/jump loop/disp8 + } |