kvisc/ka/sys/intr/excepts.k

30 lines
923 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 esp, EXCT0_STACK
mov ax1, nx0
bzr nx0, DefaultTrapHandler.handle_Shutdown
bltu 11, nx0, .unknown
mov esi, .err_ukn
lea ax0, b[esi + nx0 * 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 = "Illformed instruction exception"
.err_acc = "Invalid memory access exception"
.err_sys = "Supervisor-only instruct. 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"