Skip to content

Commit 153e18f

Browse files
Add sad calculator sprite to kernel panic screen
1 parent ccbbb16 commit 153e18f

File tree

1 file changed

+40
-8
lines changed

1 file changed

+40
-8
lines changed

src/00/panic.asm

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ panic:
3737
jr z, ++_
3838
_: ld iy, 0xC000
3939
_: call clearBuffer
40+
; Draw sad calculator
41+
ld de, 2 << 8 | 2
42+
ld b, 22
43+
ld hl, sad_calc
44+
call putSprite16OR
4045
; Find the appropriate error message
41-
ld de, 0
42-
ld b, 0
46+
ld de, 16 << 8 | 6
47+
ld b, 16
4348
ld hl, errorMessage
4449
rst 0x20
4550
.dw drawStr
@@ -62,12 +67,13 @@ _: ld e, (hl)
6267
inc hl
6368
ld d, (hl)
6469
ex de, hl
65-
ld de, 0x0006
70+
ld de, 16 << 8 | 12
6671
rst 0x20
6772
.dw drawStr
6873
ld a, c
6974
cp 1
7075
jr z, attemptRecovery
76+
ld de, 1 << 8 | 36
7177
ld hl, continueMessage
7278
rst 0x20
7379
.dw drawStr
@@ -82,6 +88,8 @@ _: call getKey_skipCheck
8288
call flushkeys_skipCheck
8389
jp boot
8490
attemptRecovery:
91+
ld de, 1 << 8 | 29
92+
ld b , 10
8593
ld hl, recoveryMessage
8694
rst 0x20
8795
.dw drawStr
@@ -104,12 +112,12 @@ recover:
104112
errorMessage:
105113
.db "::Kernel Error ", 0
106114
continueMessage:
107-
.db "\n\nPress a key to shut down", 0
115+
.db "Press a key to shut down", 0
108116
recoveryMessage:
109-
.db "\n\nRecovery may be possible\n"
110-
.db " +: Attempt recovery\n"
111-
.db " -: Shut down\n"
112-
.db "Press a key", 0
117+
.db "Recovery may be possible\n"
118+
.db "+: Attempt recovery\n"
119+
.db "-: Shut down\n"
120+
.db "\n Press a key", 0
113121
errorTable:
114122
.dw init_not_found_text
115123
.dw no_threads_text
@@ -124,3 +132,27 @@ no_active_threads_text:
124132
.db "No active threads", 0
125133
library_not_found_text:
126134
.db "Library not loaded", 0
135+
136+
sad_calc:
137+
.db 0x7f,0xc0
138+
.db 0xff,0xe0
139+
.db 0xc0,0x60
140+
.db 0xd1,0x60
141+
.db 0xc0,0x60
142+
.db 0xce,0x60
143+
.db 0xd1,0x60
144+
.db 0xc0,0x60
145+
.db 0xff,0xe0
146+
.db 0xff,0xe0
147+
.db 0x80,0x20
148+
.db 0xa9,0x20
149+
.db 0x83,0xa0
150+
.db 0xa9,0x20
151+
.db 0x80,0x20
152+
.db 0xaa,0xa0
153+
.db 0x80,0x20
154+
.db 0xaa,0xa0
155+
.db 0x80,0x20
156+
.db 0x80,0x20
157+
.db 0x7f,0xc0
158+
.db 0x00,0x00

0 commit comments

Comments
 (0)