kvisc/ka/sys/intr/common.k

61 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-07-09 19:51:03 +02:00
; The OS/K Team licenses this file to you under the MIT license.
; See the LICENSE file in the project root for more information.
2019-08-06 22:47:39 +02:00
ScreenOfDeath:
2019-09-07 16:45:03 +02:00
push nx0
mov nx0, ax0
2019-08-06 22:47:39 +02:00
prn 10
prn PRN_CLEAR
prn PRN_FLUSH
2019-08-06 23:21:37 +02:00
push ax1
call printf, .scr1
2019-08-14 20:23:05 +02:00
pop
2019-08-06 22:47:39 +02:00
2019-09-07 16:45:03 +02:00
bnz nx2, .not_con
2019-08-06 22:47:39 +02:00
push .scr2_con
jmp .do_print
.not_con:
2019-08-21 16:57:32 +02:00
; rframes #2-#3-#4 belong to kernel
2019-09-07 16:45:03 +02:00
blt 4, nx2, .not_krn
2019-08-06 22:47:39 +02:00
push .scr2_krn
jmp .do_print
.not_krn:
push .scr2_usr
.do_print:
2019-09-07 16:45:03 +02:00
push nx2, nx0
2019-08-06 22:47:39 +02:00
call printf, .scr2
2019-09-07 16:45:03 +02:00
add esp, 24
2019-08-06 22:47:39 +02:00
2019-09-07 16:45:03 +02:00
call dumprf, nx2
2019-08-06 22:47:39 +02:00
prn 10
call print, .scr3
.loop:
pause
pause
2019-09-07 16:45:03 +02:00
scan eax
2019-09-08 19:04:07 +02:00
jeaxz .loop
2019-08-06 22:47:39 +02:00
2019-09-07 16:45:03 +02:00
beq eax, 0x0A, DefaultTrapHandler.handle_Exit
beq eax, 0x1B, DefaultTrapHandler.handle_Shutdown
2019-08-06 22:47:39 +02:00
jmp .loop
crash
2019-08-06 23:21:37 +02:00
.scr1 = "-------- Unhandled EXCEPTION, TRAP/SYSCALL or INTERRUPT (code %d)\n"
.scr2 = "Description: %s\nFrame: %d (%s)\n\n"
2019-08-06 22:47:39 +02:00
.scr3 = "Press:\n ENTER to procede to COMMAND.COM\n ESCAPE to shutdown machine\n\n"
.scr2_con = "dedicated command.com frame"
.scr2_usr = "userspace application frame"
.scr2_krn = "exception/interrupt handler"