1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/ka/sys/intr/excepts.k
julianb0 b890d67ff4
vm
2019-08-06 23:21:37 +02:00

30 lines
929 B
Plaintext

; The OS/K Team licenses this file to you under the MIT license.
; See the LICENSE file in the project root for more information.
DefaultExceptionHandler:
mov rsp, EXCT0_STACK
mov ax1, r12
b.z r12, zero, DefaultTrapHandler.handle_Shutdown
b.a r12, 11, .unknown
mov rsi, .err_ukn
lea ax0, b[rsi + r12 * 32]
call ScreenOfDeath
.unknown:
call ScreenOfDeath, .err_ukn
crash
.err_ukn = "Unknown exception number\0\0\0\0\0\0\0"
.err_udf = "Undefined behaviour exception\0\0"
.err_ill = "Ill-formed exception exception\0"
.err_acc = "Invalid memory access exception"
.err_sys = "Supervisor-only exception used\0"
.err_dbf = "Double fault exception~~~~~~~~\0"
.err_imp = "Feat. not implemented exception"
.err_ali = "Misalignmed address exception\0\0"
.err_brk = "BREAK key (Ctrl+C) exception\0\0\0"
.err_ovf = "Overflow flag raised exception\0"
.err_div = "Division by zero exception\0\0\0\0\0"