| author | brandonlw |
| Thu, 22 May 2014 01:52:19 -0400 | |
| changeset 44 | f4f75ec42b53 |
| parent 43 | source/page01/initial.asm@486c42a314bc |
| permissions | -rw-r--r-- |
| 7 | 1 |
p01sub_55B5: |
| 4 | 2 |
call lcd_busy |
| 8 | 3 |
out (11h), a |
4 |
jr p01loc_55C6 |
|
| 44 | 5 |
sOK: call lcd_busy |
| 8 | 6 |
in a, (11h) |
| 4 | 7 |
call lcd_busy |
| 8 | 8 |
in a, (11h) |
| 7 | 9 |
p01loc_55C6: |
| 4 | 10 |
push af |
| 8 | 11 |
ld a, (curXRow) |
12 |
jr p01loc_55DD |
|
| 7 | 13 |
p01sub_55CC: |
| 4 | 14 |
call lcd_busy |
| 8 | 15 |
in a, (11h) |
| 4 | 16 |
call lcd_busy |
| 8 | 17 |
in a, (11h) |
| 7 | 18 |
p01sub_55D6: |
| 4 | 19 |
push af |
| 8 | 20 |
ld a, (curXRow) |
21 |
add a, 8 |
|
22 |
sub b |
|
| 7 | 23 |
p01loc_55DD: |
| 4 | 24 |
call p01sub_55E5 |
25 |
call SetXUp |
|
| 8 | 26 |
pop af |
| 4 | 27 |
ret |
| 7 | 28 |
p01sub_55E5: |
| 4 | 29 |
call SetYUp |
| 44 | 30 |
cp 80h |
| 8 | 31 |
ret c |
| 44 | 32 |
cp 0C0h |
| 8 | 33 |
ret nc |
| 4 | 34 |
call lcd_busy |
| 8 | 35 |
out (10h), a |
| 4 | 36 |
ret |
37 |
||
| 44 | 38 |
PutMap: di |
| 4 | 39 |
push af |
40 |
push bc |
|
41 |
push de |
|
42 |
push hl |
|
43 |
push ix |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
44 |
res plotDisp, (iy+plotFlags) |
|
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
45 |
bit appTextSave, (iy+appFlags) |
| 8 | 46 |
jr z, p01loc_5609 |
| 4 | 47 |
call getcurloc |
| 8 | 48 |
ld (hl), a |
| 7 | 49 |
p01loc_5609: |
| 8 | 50 |
or a |
51 |
jr z, p01loc_5610 |
|
| 44 | 52 |
cp 0F5h |
| 8 | 53 |
jr c, p01loc_5612 |
| 7 | 54 |
p01loc_5610: |
| 44 | 55 |
ld a, 0D0h |
| 7 | 56 |
p01loc_5612: |
| 8 | 57 |
ld l, a |
58 |
ld h, 0 |
|
59 |
add hl, hl |
|
60 |
add hl, hl |
|
61 |
add hl, hl |
|
| 4 | 62 |
call Page0Call_3BC7 |
63 |
push hl |
|
| 8 | 64 |
pop ix |
65 |
ld a, (curRow) |
|
| 4 | 66 |
call MAKEROWCMD |
| 8 | 67 |
ld (curXRow), a |
68 |
ld a, (curRow+1) |
|
69 |
and 1Fh |
|
| 44 | 70 |
add a, 20h |
| 8 | 71 |
ld b, a |
72 |
xor a |
|
| 4 | 73 |
call lcd_busy |
| 8 | 74 |
out (10h), a |
75 |
ld a, (curXRow) |
|
| 4 | 76 |
call p01sub_55E5 |
77 |
call SetXUp |
|
| 8 | 78 |
ld a, b |
| 4 | 79 |
call lcd_busy |
| 8 | 80 |
out (10h), a |
81 |
ld b, 8 |
|
| 7 | 82 |
p01loc_5646: |
| 8 | 83 |
xor a |
84 |
dec b |
|
85 |
jr z, p01loc_564F |
|
86 |
ld a, (ix+0) |
|
87 |
inc ix |
|
| 7 | 88 |
p01loc_564F: |
| 8 | 89 |
inc b |
| 4 | 90 |
sla a |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
91 |
bit textInverse, (iy+textFlags) |
| 8 | 92 |
jr z, p01loc_568D |
| 44 | 93 |
xor 3Eh |
| 7 | 94 |
p01loc_565A: |
| 4 | 95 |
push af |
| 8 | 96 |
ld a, (curRow+1) |
97 |
and 1Fh |
|
98 |
jr z, p01loc_568A |
|
99 |
add a, 1Fh |
|
| 4 | 100 |
call lcd_busy |
| 8 | 101 |
out (10h), a |
| 4 | 102 |
call p01sub_55CC |
| 8 | 103 |
or 1 |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
104 |
bit preClrForMode, (iy+newDispF) |
| 8 | 105 |
jr z, p01loc_5676 |
| 44 | 106 |
and 3Eh |
| 7 | 107 |
p01loc_5676: |
| 4 | 108 |
call lcd_busy |
| 8 | 109 |
out (11h), a |
110 |
ld a, (curRow+1) |
|
111 |
and 1Fh |
|
| 44 | 112 |
add a, 20h |
| 4 | 113 |
call lcd_busy |
| 8 | 114 |
out (10h), a |
| 4 | 115 |
call p01sub_55D6 |
| 7 | 116 |
p01loc_568A: |
| 8 | 117 |
pop af |
118 |
jr p01loc_5693 |
|
| 7 | 119 |
p01loc_568D: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
120 |
bit preClrForMode, (iy+newDispF) |
| 8 | 121 |
jr nz, p01loc_565A |
| 7 | 122 |
p01loc_5693: |
| 4 | 123 |
call lcd_busy |
| 8 | 124 |
out (11h), a |
| 4 | 125 |
djnz p01loc_5646 |
| 8 | 126 |
ld a, 1 |
| 4 | 127 |
call lcd_busy |
| 8 | 128 |
out (10h), a |
| 7 | 129 |
p01loc_56A1: |
| 8 | 130 |
pop ix |
| 7 | 131 |
p01loc_56A3: |
| 8 | 132 |
pop hl |
133 |
pop de |
|
134 |
pop bc |
|
135 |
pop af |
|
| 4 | 136 |
ret |
137 |
||
| 44 | 138 |
PutC: push af |
| 4 | 139 |
push hl |
| 44 | 140 |
cp 0D6h |
| 8 | 141 |
jr nz, p01loc_56C0 |
| 4 | 142 |
call EraseEOL |
143 |
call newline |
|
| 8 | 144 |
ld a, (winTop+1) |
145 |
ld l, a |
|
146 |
ld a, (curRow) |
|
147 |
cp l |
|
148 |
jr nc, p01loc_56D1 |
|
| 44 | 149 |
ld a, 3Ah |
| 7 | 150 |
p01loc_56C0: |
| 4 | 151 |
call PutMap |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
152 |
res preClrForMode, (iy+newDispF) |
| 8 | 153 |
ld hl, curCol |
154 |
inc (hl) |
|
155 |
ld a, (hl) |
|
156 |
cp 10h |
|
| 4 | 157 |
call nc, newline |
| 7 | 158 |
p01loc_56D1: |
| 8 | 159 |
pop hl |
160 |
pop af |
|
| 4 | 161 |
ret |
162 |
||
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
163 |
Page01_3C75: |
| 4 | 164 |
push bc |
| 7 | 165 |
p01loc_56D5: |
| 8 | 166 |
ld bc, (unk_839F) |
167 |
ld (OP1), bc |
|
168 |
ld bc, (unk_83A1) |
|
169 |
ld (OP1M), bc |
|
170 |
ld hl, 848Dh |
|
171 |
ld e, a |
|
172 |
ld d, 0 |
|
173 |
add hl, de |
|
| 4 | 174 |
push de |
175 |
push hl |
|
| 8 | 176 |
ld b, a |
| 7 | 177 |
p01loc_56EF: |
| 8 | 178 |
ld de, 0Ah |
| 4 | 179 |
push hl |
180 |
push bc |
|
| 8 | 181 |
rst 28h |
182 |
.dw 80B1h |
|
183 |
pop bc |
|
184 |
pop hl |
|
| 29 | 185 |
ld a, (OP2+3) |
| 44 | 186 |
add a, 30h |
| 8 | 187 |
ld (hl), a |
188 |
dec hl |
|
| 4 | 189 |
djnz p01loc_56EF |
| 8 | 190 |
sub a |
191 |
pop hl |
|
192 |
inc hl |
|
193 |
ld (hl), a |
|
194 |
ld hl, 848Dh |
|
| 44 | 195 |
ld a, 30h |
| 8 | 196 |
pop bc |
197 |
ld b, c |
|
198 |
dec b |
|
| 7 | 199 |
p01loc_570E: |
| 8 | 200 |
inc hl |
201 |
cp (hl) |
|
202 |
jr nz, p01loc_5716 |
|
| 44 | 203 |
ld (hl), 20h |
| 4 | 204 |
djnz p01loc_570E |
| 7 | 205 |
p01loc_5716: |
| 8 | 206 |
ld hl, OP3 |
207 |
ld a, c |
|
208 |
cp 7 |
|
209 |
jr nz, p01loc_5724 |
|
| 44 | 210 |
ld a, 20h |
| 8 | 211 |
cp (hl) |
212 |
jr nz, p01loc_5727 |
|
213 |
inc hl |
|
| 7 | 214 |
p01loc_5724: |
| 8 | 215 |
pop bc |
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
216 |
jr Page01_3C81 |
| 7 | 217 |
p01loc_5727: |
| 29 | 218 |
ld a, (OP3+4) |
| 44 | 219 |
cp 35h |
| 8 | 220 |
jr nc, p01loc_573E |
| 44 | 221 |
ld a, 4Bh |
| 29 | 222 |
ld (OP3+4), a |
| 8 | 223 |
xor a |
| 29 | 224 |
ld (OP3+5), a |
| 44 | 225 |
ld a, 20h |
| 4 | 226 |
call PutC |
| 8 | 227 |
jr p01loc_5724 |
| 7 | 228 |
p01loc_573E: |
| 8 | 229 |
ld hl, 83A2h |
| 44 | 230 |
ld a, 0F4h |
| 8 | 231 |
add a, (hl) |
232 |
ld (hl), a |
|
233 |
dec hl |
|
234 |
ld a, 1 |
|
| 4 | 235 |
adc a, (hl) |
| 8 | 236 |
ld (hl), a |
237 |
dec hl |
|
238 |
ld a, 0 |
|
| 4 | 239 |
adc a, (hl) |
| 8 | 240 |
ld (hl), a |
241 |
ld a, c |
|
242 |
jr p01loc_56D5 |
|
| 44 | 243 |
DispHL: push bc |
| 8 | 244 |
ld de, 847Ch |
245 |
ld b, 5 |
|
| 7 | 246 |
p01loc_5758: |
| 4 | 247 |
call DivHLBy10 |
| 44 | 248 |
add a, 30h |
| 8 | 249 |
ld (de), a |
250 |
dec de |
|
| 4 | 251 |
djnz p01loc_5758 |
| 8 | 252 |
sub a |
| 29 | 253 |
ld (OP1+5), a |
| 8 | 254 |
ex de, hl |
| 44 | 255 |
ld a, 30h |
| 8 | 256 |
ld b, 4 |
| 7 | 257 |
p01loc_576A: |
| 8 | 258 |
inc hl |
259 |
cp (hl) |
|
260 |
jr nz, p01loc_5772 |
|
| 44 | 261 |
ld (hl), 20h |
| 4 | 262 |
djnz p01loc_576A |
| 7 | 263 |
p01loc_5772: |
| 8 | 264 |
ld hl, OP1 |
265 |
pop bc |
|
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
266 |
Page01_3C81: |
| 4 | 267 |
push bc |
268 |
push af |
|
| 7 | 269 |
p01loc_5778: |
| 8 | 270 |
ld a, (hl) |
271 |
or a |
|
| 4 | 272 |
scf |
| 8 | 273 |
jr z, p01loc_5791 |
274 |
ld a, (curRow+1) |
|
275 |
cp 0Fh |
|
276 |
ld a, (hl) |
|
277 |
jr c, p01loc_578B |
|
| 4 | 278 |
call PutMap |
| 8 | 279 |
xor a |
280 |
jr p01loc_5791 |
|
| 7 | 281 |
p01loc_578B: |
| 4 | 282 |
call PutC |
| 8 | 283 |
inc hl |
284 |
jr p01loc_5778 |
|
| 7 | 285 |
p01loc_5791: |
| 8 | 286 |
pop bc |
287 |
ld a, b |
|
288 |
pop bc |
|
| 4 | 289 |
ret |
290 |
||
| 44 | 291 |
PutS: push bc |
| 4 | 292 |
push af |
| 8 | 293 |
ld a, (winTop+1) |
294 |
ld b, a |
|
| 7 | 295 |
p01loc_579B: |
| 8 | 296 |
ld a, (hl) |
297 |
inc hl |
|
298 |
or a |
|
| 4 | 299 |
scf |
| 8 | 300 |
jr z, p01loc_57AA |
| 4 | 301 |
call PutC |
| 8 | 302 |
ld a, (curRow) |
303 |
cp b |
|
304 |
jr c, p01loc_579B |
|
| 7 | 305 |
p01loc_57AA: |
| 8 | 306 |
pop bc |
307 |
ld a, b |
|
308 |
pop bc |
|
| 4 | 309 |
ret |
310 |
||
| 44 | 311 |
putpsb: ld b, (hl) |
| 8 | 312 |
inc hl |
313 |
ld a, b |
|
314 |
or a |
|
315 |
ret z |
|
316 |
ld a, (hl) |
|
| 44 | 317 |
cp 20h |
| 8 | 318 |
jr z, p01loc_57CB |
319 |
jr p01loc_57C8 |
|
| 7 | 320 |
p01loc_57BA: |
| 8 | 321 |
ld a, (curRow+1) |
322 |
cp 0Fh |
|
323 |
jr c, p01loc_57C7 |
|
324 |
ld a, (hl) |
|
| 4 | 325 |
call PutMap |
| 8 | 326 |
jr p01loc_57CB |
| 7 | 327 |
p01loc_57C7: |
| 8 | 328 |
ld a, (hl) |
| 7 | 329 |
p01loc_57C8: |
| 4 | 330 |
call PutC |
| 7 | 331 |
p01loc_57CB: |
| 8 | 332 |
inc hl |
| 4 | 333 |
djnz p01loc_57BA |
334 |
ret |
|
335 |
||
| 44 | 336 |
PutPS: ld b, (hl) |
| 8 | 337 |
inc hl |
338 |
ld a, b |
|
339 |
or a |
|
340 |
ret z |
|
| 7 | 341 |
p01loc_57D4: |
| 8 | 342 |
ld a, (hl) |
343 |
inc hl |
|
| 4 | 344 |
call PutC |
| 8 | 345 |
ld a, (curRow) |
346 |
ld c, a |
|
347 |
ld a, (winTop+1) |
|
348 |
cp c |
|
349 |
ret z |
|
| 4 | 350 |
djnz p01loc_57D4 |
351 |
ret |
|
352 |
||
| 44 | 353 |
wputps: ld b, (hl) |
| 8 | 354 |
inc hl |
355 |
ld a, b |
|
356 |
or a |
|
357 |
ret z |
|
| 7 | 358 |
p01loc_57EA: |
| 8 | 359 |
ld a, (hl) |
360 |
inc hl |
|
| 4 | 361 |
call wputc |
| 8 | 362 |
ret c |
| 4 | 363 |
djnz p01loc_57EA |
364 |
ret |
|
365 |
||
| 44 | 366 |
putbuf: xor a |
367 |
putbuf1:bit 1, (iy+2Ah) |
|
| 8 | 368 |
jr z, p01loc_57FE |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
369 |
call j_BCALL_4CC9 |
| 4 | 370 |
ret |
| 7 | 371 |
p01loc_57FE: |
| 4 | 372 |
push af |
373 |
push de |
|
| 8 | 374 |
ld hl, (editCursor) |
375 |
ld de, (editBtm) |
|
| 4 | 376 |
call CpHLDE |
| 8 | 377 |
jr nz, p01loc_5824 |
378 |
ld a, (mcxCurApp) |
|
| 44 | 379 |
cp 42h |
| 8 | 380 |
jr nz, p01loc_5824 |
381 |
ld a, (curRow) |
|
382 |
or a |
|
383 |
jr nz, p01loc_5824 |
|
384 |
pop de |
|
385 |
ld a, e |
|
| 4 | 386 |
call PutMap |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
387 |
call j_BufLeft |
| 8 | 388 |
ld a, e |
389 |
pop bc |
|
| 4 | 390 |
ret |
| 7 | 391 |
p01loc_5824: |
| 8 | 392 |
pop de |
| 4 | 393 |
call GETTOKSTRING |
394 |
push hl |
|
| 8 | 395 |
ld b, (hl) |
396 |
inc b |
|
397 |
ld hl, curCol |
|
398 |
ld a, 10h |
|
| 4 | 399 |
push af |
| 8 | 400 |
sub (hl) |
401 |
cp b |
|
402 |
jr c, p01loc_583C |
|
403 |
pop af |
|
404 |
pop hl |
|
405 |
ld a, (curRow+1) |
|
406 |
jr p01loc_585F |
|
| 7 | 407 |
p01loc_583C: |
| 8 | 408 |
pop af |
409 |
sub b |
|
410 |
ld (hl), a |
|
411 |
pop hl |
|
| 4 | 412 |
push af |
| 8 | 413 |
ld c, a |
414 |
ld a, (winLeftEdge) |
|
415 |
inc c |
|
416 |
cp c |
|
417 |
jr c, p01loc_5860 |
|
418 |
pop hl |
|
| 7 | 419 |
p01loc_584A: |
| 8 | 420 |
pop de |
421 |
ld a, 0Eh |
|
422 |
ld (curRow+1), a |
|
| 4 | 423 |
call fdispEOL |
| 8 | 424 |
ld a, 0Eh |
425 |
ld (curRow+1), a |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
426 |
call j_FDISPBOL |
| 8 | 427 |
ld a, 0Eh |
428 |
jr p01loc_5893 |
|
| 7 | 429 |
p01loc_585F: |
| 4 | 430 |
push af |
| 7 | 431 |
p01loc_5860: |
| 4 | 432 |
push hl |
433 |
call PutPS |
|
434 |
call fdispEOL |
|
| 8 | 435 |
pop hl |
436 |
pop bc |
|
437 |
ld a, (curRow+1) |
|
438 |
bit 1, (iy+0Eh) |
|
439 |
jr z, p01loc_5889 |
|
440 |
cp 0Fh |
|
441 |
jr nz, p01loc_5889 |
|
442 |
ld c, a |
|
443 |
pop af |
|
444 |
ld a, c |
|
445 |
jr c, p01loc_588A |
|
| 4 | 446 |
push af |
| 8 | 447 |
ld a, (winLeftEdge) |
448 |
cp b |
|
449 |
jr z, p01loc_584A |
|
450 |
ld a, b |
|
451 |
dec a |
|
452 |
ld (curRow+1), a |
|
453 |
jr p01loc_585F |
|
| 7 | 454 |
p01loc_5889: |
| 8 | 455 |
pop de |
| 7 | 456 |
p01loc_588A: |
| 4 | 457 |
push af |
| 8 | 458 |
ld a, b |
459 |
ld (curRow+1), a |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
460 |
call j_FDISPBOL1 |
| 8 | 461 |
pop af |
| 7 | 462 |
p01loc_5893: |
| 8 | 463 |
ld (curRow+1), a |
| 4 | 464 |
ret |
465 |
||
| 44 | 466 |
wputc: push bc |
| 4 | 467 |
push de |
468 |
push hl |
|
| 8 | 469 |
ld c, a |
470 |
ld hl, (winRow) |
|
471 |
ld de, (winAbove) |
|
472 |
or a |
|
473 |
sbc hl, de |
|
474 |
jp p, p01loc_58AE |
|
| 7 | 475 |
p01loc_58A8: |
| 8 | 476 |
set 2, (iy+0Eh) |
477 |
jr p01loc_5910 |
|
| 7 | 478 |
p01loc_58AE: |
| 8 | 479 |
ld a, (winTop+1) |
480 |
ld e, a |
|
481 |
ld d, 0 |
|
| 4 | 482 |
call CpHLDE |
| 8 | 483 |
jr c, p01loc_58C0 |
| 4 | 484 |
scf |
| 8 | 485 |
set 3, (iy+0Eh) |
486 |
jr p01loc_5910 |
|
| 7 | 487 |
p01loc_58C0: |
| 8 | 488 |
ld a, l |
489 |
ld hl, winTop |
|
490 |
cp (hl) |
|
491 |
jr c, p01loc_58A8 |
|
492 |
ld (curRow), a |
|
493 |
ld hl, (winLeft) |
|
494 |
ld a, (winLeftEdge) |
|
495 |
ld e, a |
|
496 |
add hl, de |
|
497 |
ex de, hl |
|
498 |
ld hl, (winCol) |
|
| 4 | 499 |
call CpHLDE |
| 8 | 500 |
jp m, p01loc_5914 |
501 |
ld hl, (winLeft) |
|
502 |
ld de, 10h |
|
503 |
add hl, de |
|
504 |
ex de, hl |
|
505 |
ld hl, (winCol) |
|
| 4 | 506 |
call CpHLDE |
| 8 | 507 |
jp p, p01loc_5928 |
508 |
ld de, (winLeft) |
|
509 |
or a |
|
510 |
sbc hl, de |
|
511 |
ld a, l |
|
512 |
ld hl, winLeftEdge |
|
513 |
cp (hl) |
|
514 |
jr nz, p01loc_5901 |
|
515 |
bit 0, (iy+0Eh) |
|
516 |
jr nz, p01loc_5909 |
|
| 7 | 517 |
p01loc_5901: |
| 8 | 518 |
ld (curRow+1), a |
519 |
ld a, c |
|
| 4 | 520 |
call PutC |
| 8 | 521 |
or a |
| 7 | 522 |
p01loc_5909: |
| 8 | 523 |
ld hl, (winCol) |
524 |
inc hl |
|
525 |
ld (winCol), hl |
|
| 7 | 526 |
p01loc_5910: |
| 8 | 527 |
pop hl |
528 |
pop de |
|
529 |
pop bc |
|
| 4 | 530 |
ret |
| 7 | 531 |
p01loc_5914: |
| 8 | 532 |
or a |
533 |
bit 0, (iy+0Eh) |
|
534 |
jr nz, p01loc_5909 |
|
535 |
set 0, (iy+0Eh) |
|
536 |
set 4, (iy+0Eh) |
|
537 |
ld a, (winLeftEdge) |
|
538 |
jr p01loc_5939 |
|
| 7 | 539 |
p01loc_5928: |
| 4 | 540 |
scf |
| 8 | 541 |
bit 1, (iy+0Eh) |
542 |
jr nz, p01loc_5909 |
|
543 |
set 1, (iy+0Eh) |
|
544 |
set 5, (iy+0Eh) |
|
545 |
ld a, 0Fh |
|
| 7 | 546 |
p01loc_5939: |
| 8 | 547 |
ld (curRow+1), a |
| 44 | 548 |
ld a, 0CEh |
| 4 | 549 |
call PutMap |
| 8 | 550 |
jr p01loc_5909 |
| 4 | 551 |
|
| 44 | 552 |
wputs: ld de, (curRow) |
| 4 | 553 |
push de |
| 7 | 554 |
p01loc_5948: |
| 8 | 555 |
ld a, (hl) |
556 |
or a |
|
557 |
jr z, p01loc_5952 |
|
| 4 | 558 |
call wputc |
| 8 | 559 |
inc hl |
560 |
jr nc, p01loc_5948 |
|
| 7 | 561 |
p01loc_5952: |
| 8 | 562 |
pop hl |
563 |
ld (curRow), hl |
|
| 4 | 564 |
ret |
565 |
||
566 |
wputsEOL: |
|
| 8 | 567 |
ld de, (curRow) |
| 4 | 568 |
push de |
| 7 | 569 |
p01loc_595C: |
| 8 | 570 |
ld a, (hl) |
571 |
or a |
|
572 |
jr z, p01loc_5968 |
|
| 4 | 573 |
call wputc |
| 8 | 574 |
inc hl |
575 |
jr nc, p01loc_595C |
|
576 |
jr p01loc_596F |
|
| 7 | 577 |
p01loc_5968: |
| 8 | 578 |
ld a, (curRow+1) |
579 |
or a |
|
| 4 | 580 |
call nz, EraseEOL |
| 7 | 581 |
p01loc_596F: |
| 8 | 582 |
pop hl |
583 |
ld (curRow), hl |
|
| 4 | 584 |
ret |
585 |
||
586 |
wdispEOL: |
|
| 8 | 587 |
ld hl, (curRow) |
| 4 | 588 |
push hl |
| 8 | 589 |
ld hl, (editTail) |
590 |
ld de, (editBtm) |
|
| 7 | 591 |
p01loc_597F: |
| 4 | 592 |
call CpHLDE |
| 8 | 593 |
jr z, p01loc_598D |
594 |
ld a, (hl) |
|
| 4 | 595 |
call wputc |
| 8 | 596 |
inc hl |
597 |
jr nc, p01loc_597F |
|
598 |
jr p01loc_5994 |
|
| 7 | 599 |
p01loc_598D: |
| 8 | 600 |
ld a, (curRow+1) |
601 |
or a |
|
| 4 | 602 |
call nz, EraseEOL |
| 7 | 603 |
p01loc_5994: |
| 8 | 604 |
pop hl |
605 |
ld (curRow), hl |
|
| 4 | 606 |
ret |
607 |
||
| 44 | 608 |
whomeup:ld hl, 0 |
| 4 | 609 |
call CheckSplitFlag |
| 8 | 610 |
jr z, p01loc_59A3 |
611 |
ld l, 4 |
|
| 7 | 612 |
p01loc_59A3: |
| 8 | 613 |
ld (winRow), hl |
614 |
ld l, 0 |
|
615 |
ld (winCol), hl |
|
| 4 | 616 |
ret |
617 |
||
618 |
setNumWindow: |
|
619 |
call whomeup |
|
| 8 | 620 |
ld a, (curRow) |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
621 |
call j_setwinabove |
| 8 | 622 |
ld a, (curRow+1) |
623 |
ld (winLeftEdge), a |
|
624 |
ld e, a |
|
625 |
ld hl, 0 |
|
626 |
or a |
|
627 |
sbc hl, de |
|
628 |
ld (winLeft), hl |
|
629 |
res 1, (iy+0Eh) |
|
630 |
res 0, (iy+0Eh) |
|
| 4 | 631 |
ret |
632 |
push de |
|
633 |
push hl |
|
| 8 | 634 |
ld l, a |
635 |
ld h, 0 |
|
636 |
add hl, hl |
|
637 |
add hl, hl |
|
638 |
add hl, hl |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
639 |
call j_Load_SFont |
| 8 | 640 |
ld a, (hl) |
641 |
pop hl |
|
642 |
pop de |
|
| 4 | 643 |
ret |
644 |
||
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
645 |
Page01_3CCF: |
| 4 | 646 |
push hl |
| 8 | 647 |
ld a, (curRow) |
648 |
ld hl, winBtm |
|
649 |
cp (hl) |
|
650 |
pop hl |
|
| 4 | 651 |
ret |
652 |
||
| 44 | 653 |
newline:push af |
| 4 | 654 |
push bc |
655 |
push de |
|
656 |
push hl |
|
657 |
push ix |
|
| 8 | 658 |
sub a |
659 |
ld (curRow+1), a |
|
660 |
ld hl, curRow |
|
661 |
ld ix, winTop |
|
662 |
ld a, (hl) |
|
663 |
inc a |
|
664 |
cp (ix+1) |
|
665 |
jr c, p01loc_5A3B |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
666 |
bit appAutoScroll, (iy+appFlags) |
| 8 | 667 |
jr z, p01loc_5A3B |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
668 |
set textScrolled, (iy+textFlags) |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
669 |
call j_SCREENUP |
| 8 | 670 |
ld a, e |
| 4 | 671 |
call ClearRow |
672 |
ei |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
673 |
bit appTextSave, (iy+appFlags) |
| 8 | 674 |
jr z, p01loc_5A3C |
675 |
ld a, (ix+0) |
|
| 44 | 676 |
call ATimes16 |
| 8 | 677 |
ld l, a |
678 |
ld h, 0 |
|
679 |
ld de, textShadow |
|
680 |
add hl, de |
|
681 |
ld e, l |
|
682 |
ld d, h |
|
683 |
ld bc, 10h |
|
684 |
add hl, bc |
|
| 4 | 685 |
call p01sub_5B68 |
| 8 | 686 |
jr z, p01loc_5A31 |
| 4 | 687 |
ldir |
| 7 | 688 |
p01loc_5A31: |
| 8 | 689 |
ld b, 10h |
| 44 | 690 |
ld a, 20h |
| 7 | 691 |
p01loc_5A35: |
| 8 | 692 |
ld (de), a |
693 |
inc de |
|
| 4 | 694 |
djnz p01loc_5A35 |
| 8 | 695 |
jr p01loc_5A3C |
| 7 | 696 |
p01loc_5A3B: |
| 8 | 697 |
ld (hl), a |
| 7 | 698 |
p01loc_5A3C: |
| 8 | 699 |
jp p01loc_56A1 |
| 4 | 700 |
|
| 7 | 701 |
p01sub_5A3F: |
| 4 | 702 |
push af |
703 |
push de |
|
704 |
push hl |
|
| 8 | 705 |
ld a, 0Fh |
706 |
ld (curRow+1), a |
|
707 |
ld de, curRow |
|
708 |
ld a, (de) |
|
709 |
dec a |
|
710 |
ld hl, winTop |
|
711 |
cp (hl) |
|
712 |
jp p, p01loc_5A5E |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
713 |
bit appAutoScroll, (iy+appFlags) |
| 8 | 714 |
jr z, p01loc_5A5E |
| 4 | 715 |
call scrollDown |
| 8 | 716 |
jr p01loc_5A5F |
| 7 | 717 |
p01loc_5A5E: |
| 8 | 718 |
ld (de), a |
| 7 | 719 |
p01loc_5A5F: |
| 8 | 720 |
pop hl |
721 |
pop de |
|
722 |
pop af |
|
| 4 | 723 |
ret |
724 |
||
725 |
moveDown: |
|
| 8 | 726 |
ld a, (curRow) |
727 |
inc a |
|
728 |
ld hl, winBtm |
|
729 |
cp (hl) |
|
730 |
jr nc, scrollUp |
|
731 |
ld (curRow), a |
|
| 4 | 732 |
ret |
733 |
||
| 7 | 734 |
scrollUp: |
| 4 | 735 |
push af |
736 |
push bc |
|
737 |
push de |
|
738 |
push hl |
|
739 |
push ix |
|
| 8 | 740 |
ld ix, winTop |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
741 |
call j_SCREENUP |
| 8 | 742 |
ld a, e |
| 4 | 743 |
call ClearRow |
744 |
ei |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
745 |
bit appTextSave, (iy+appFlags) |
| 8 | 746 |
jp z, p01loc_56A1 |
747 |
ld a, (ix+0) |
|
| 44 | 748 |
call ATimes16 |
| 8 | 749 |
ld l, a |
750 |
ld h, 0 |
|
751 |
ld de, textShadow |
|
752 |
add hl, de |
|
753 |
ld e, l |
|
754 |
ld d, h |
|
755 |
ld bc, 10h |
|
756 |
add hl, bc |
|
| 4 | 757 |
call p01sub_5B68 |
| 8 | 758 |
jr z, p01loc_5AA4 |
| 4 | 759 |
ldir |
| 7 | 760 |
p01loc_5AA4: |
| 8 | 761 |
ld b, 10h |
| 44 | 762 |
ld a, 20h |
| 7 | 763 |
p01loc_5AA8: |
| 8 | 764 |
ld (de), a |
765 |
inc de |
|
| 4 | 766 |
djnz p01loc_5AA8 |
| 8 | 767 |
jp p01loc_56A1 |
| 4 | 768 |
|
769 |
shrinkWindow: |
|
| 8 | 770 |
ld a, (curRow) |
771 |
add a, b |
|
772 |
sub 7 |
|
773 |
cp 1 |
|
774 |
ret m |
|
775 |
ld b, a |
|
776 |
ld hl, curRow |
|
| 7 | 777 |
p01loc_5ABC: |
| 4 | 778 |
call scrollUp |
| 8 | 779 |
dec (hl) |
| 4 | 780 |
djnz p01loc_5ABC |
781 |
ret |
|
782 |
||
| 44 | 783 |
moveUp: ld a, (curRow) |
| 8 | 784 |
dec a |
785 |
ld hl, winTop |
|
786 |
cp (hl) |
|
787 |
jp m, scrollDown |
|
788 |
ld (curRow), a |
|
| 4 | 789 |
ret |
790 |
||
| 7 | 791 |
p01sub_5AD2: |
| 4 | 792 |
push af |
793 |
push bc |
|
794 |
push de |
|
795 |
push hl |
|
796 |
push ix |
|
| 8 | 797 |
ld hl, winBtm |
798 |
cp (hl) |
|
799 |
jr nz, p01loc_5AE8 |
|
| 4 | 800 |
call scrollUp |
| 8 | 801 |
ld hl, curRow |
802 |
dec (hl) |
|
803 |
jp p01loc_56A1 |
|
| 7 | 804 |
p01loc_5AE8: |
| 8 | 805 |
ld hl, winTop |
806 |
ld b, (hl) |
|
| 4 | 807 |
push bc |
| 8 | 808 |
ld (hl), a |
| 4 | 809 |
call scrollDown |
| 8 | 810 |
pop af |
811 |
ld (hl), a |
|
812 |
jp p01loc_56A1 |
|
| 4 | 813 |
|
| 7 | 814 |
scrollDown: |
| 4 | 815 |
push af |
816 |
push bc |
|
817 |
push de |
|
818 |
push hl |
|
819 |
push ix |
|
820 |
call RunIndicOff |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
821 |
set textScrolled, (iy+textFlags) |
| 8 | 822 |
ld ix, winTop |
823 |
ld a, (ix+1) |
|
824 |
sub (ix+0) |
|
825 |
dec a |
|
826 |
jr nz, p01loc_5B19 |
|
827 |
ld a, (ix+1) |
|
828 |
dec a |
|
| 4 | 829 |
call MAKEROWCMD |
| 8 | 830 |
jr p01loc_5B24 |
| 7 | 831 |
p01loc_5B19: |
| 8 | 832 |
ld b, a |
| 44 | 833 |
ld c, 0F8h |
| 8 | 834 |
ld a, (ix+1) |
835 |
dec a |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
836 |
call j_ScreenUpDown |
| 8 | 837 |
ld a, e |
| 7 | 838 |
p01loc_5B24: |
| 4 | 839 |
call ClearRow |
840 |
ei |
|
841 |
call RunIndicOn |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
842 |
bit appTextSave, (iy+appFlags) |
| 8 | 843 |
jr z, p01loc_5B53 |
844 |
ld a, (ix+1) |
|
| 44 | 845 |
call ATimes16 |
| 8 | 846 |
ld l, a |
847 |
ld h, 0 |
|
848 |
ld de, asm_ind_call |
|
849 |
add hl, de |
|
850 |
ld e, l |
|
851 |
ld d, h |
|
852 |
ld bc, 0FFF0h |
|
853 |
add hl, bc |
|
| 4 | 854 |
call p01sub_5B68 |
| 8 | 855 |
jr z, p01loc_5B4B |
| 4 | 856 |
lddr |
| 7 | 857 |
p01loc_5B4B: |
| 8 | 858 |
ld b, 10h |
| 44 | 859 |
ld a, 20h |
| 7 | 860 |
p01loc_5B4F: |
| 8 | 861 |
ld (de), a |
862 |
dec de |
|
| 4 | 863 |
djnz p01loc_5B4F |
| 7 | 864 |
p01loc_5B53: |
| 8 | 865 |
jp p01loc_56A1 |
| 4 | 866 |
|
| 44 | 867 |
#ifndef DEVIATE_FROM_ORIGINAL_FILE |
868 |
;Apparently not referenced anywhere. |
|
| 8 | 869 |
ld a, (ix+1) |
870 |
sub (ix+0) |
|
871 |
dec a |
|
| 4 | 872 |
push hl |
873 |
push de |
|
| 8 | 874 |
ld b, a |
| 4 | 875 |
call p01sub_6100 |
| 8 | 876 |
ld b, h |
877 |
ld c, l |
|
878 |
pop de |
|
879 |
pop hl |
|
| 4 | 880 |
ret |
| 44 | 881 |
#endif |
| 4 | 882 |
|
| 7 | 883 |
p01sub_5B68: |
| 8 | 884 |
ld a, (ix+1) |
885 |
sub (ix+0) |
|
886 |
dec a |
|
| 44 | 887 |
call ATimes16 |
| 8 | 888 |
ld c, a |
889 |
ld b, 0 |
|
| 4 | 890 |
ret |
891 |
||
| 7 | 892 |
ClrLCDFull: |
| 4 | 893 |
push af |
| 8 | 894 |
ld hl, 8A02h |
| 4 | 895 |
push hl |
| 8 | 896 |
ld a, (hl) |
897 |
and 1 |
|
| 4 | 898 |
push af |
| 8 | 899 |
res 0, (hl) |
| 44 | 900 |
ld b, 80h |
901 |
ld a, 0B8h |
|
| 8 | 902 |
jr p01loc_5BAB |
| 4 | 903 |
|
| 44 | 904 |
ClrLCD: push af |
| 8 | 905 |
ld hl, 8A02h |
| 4 | 906 |
push hl |
| 8 | 907 |
ld a, (hl) |
908 |
and 1 |
|
| 4 | 909 |
push af |
| 8 | 910 |
res 0, (hl) |
| 44 | 911 |
ld a, 0B8h |
| 4 | 912 |
push af |
| 44 | 913 |
ld b, 80h |
| 4 | 914 |
call CheckSplitFlag |
| 8 | 915 |
jr z, p01loc_5BAA |
| 44 | 916 |
ld b, 0A0h |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
917 |
bit plotDisp, (iy+plotFlags) |
| 8 | 918 |
jr z, p01loc_5BAA |
919 |
pop af |
|
| 44 | 920 |
ld a, 98h |
921 |
ld b, 80h |
|
| 4 | 922 |
push af |
| 7 | 923 |
p01loc_5BAA: |
| 8 | 924 |
pop af |
| 7 | 925 |
p01loc_5BAB: |
| 4 | 926 |
di |
| 7 | 927 |
p01loc_5BAC: |
| 4 | 928 |
push bc |
929 |
push af |
|
930 |
call ClearRow |
|
| 8 | 931 |
pop af |
932 |
sub 8 |
|
933 |
pop bc |
|
934 |
cp b |
|
935 |
jr nc, p01loc_5BAC |
|
| 4 | 936 |
ei |
| 8 | 937 |
pop af |
938 |
pop hl |
|
939 |
or (hl) |
|
940 |
ld (hl), a |
|
941 |
pop af |
|
| 4 | 942 |
ret |
943 |
||
| 7 | 944 |
p01sub_5BBF: |
| 4 | 945 |
push af |
| 8 | 946 |
ld a, i |
| 4 | 947 |
push af |
| 8 | 948 |
ld hl, 8A02h |
| 4 | 949 |
push hl |
| 8 | 950 |
ld a, (hl) |
951 |
and 1 |
|
| 4 | 952 |
push af |
| 8 | 953 |
res 0, (hl) |
| 44 | 954 |
ld a, 0B8h |
955 |
ld b, 80h |
|
| 4 | 956 |
di |
| 7 | 957 |
p01loc_5BD2: |
| 4 | 958 |
push bc |
959 |
push af |
|
960 |
call ClearRow |
|
| 8 | 961 |
pop af |
962 |
sub 8 |
|
963 |
pop bc |
|
964 |
cp b |
|
965 |
jr nc, p01loc_5BD2 |
|
966 |
pop af |
|
967 |
pop hl |
|
968 |
or (hl) |
|
969 |
ld (hl), a |
|
970 |
pop af |
|
971 |
jp po, p01loc_5BE7 |
|
| 4 | 972 |
ei |
| 7 | 973 |
p01loc_5BE7: |
| 8 | 974 |
pop af |
| 4 | 975 |
ret |
976 |
||
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
977 |
Page01_3D05: |
| 4 | 978 |
call p01sub_5BBF |
| 8 | 979 |
jr p01loc_5BF6 |
| 4 | 980 |
|
981 |
ClrScrnFull: |
|
982 |
call ClrLCDFull |
|
| 8 | 983 |
jr p01loc_5BF6 |
| 4 | 984 |
|
985 |
ClrScrn: |
|
986 |
call ClrLCD |
|
| 7 | 987 |
p01loc_5BF6: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
988 |
bit appTextSave, (iy+appFlags) |
| 8 | 989 |
ret z |
| 4 | 990 |
ClrTxtShd: |
| 44 | 991 |
ld bc, 7Fh |
| 8 | 992 |
ld de, 8509h |
993 |
ld hl, textShadow |
|
| 44 | 994 |
ld (hl), 20h |
| 4 | 995 |
ldir |
996 |
ret |
|
997 |
||
998 |
ClrWindow: |
|
999 |
call HomeUp |
|
| 8 | 1000 |
ld a, (winTop+1) |
1001 |
dec a |
|
| 4 | 1002 |
call MAKEROWCMD |
1003 |
push af |
|
| 8 | 1004 |
ld a, (winTop) |
| 4 | 1005 |
call MAKEROWCMD |
1006 |
di |
|
1007 |
||
| 7 | 1008 |
p01loc_5C1B: |
| 4 | 1009 |
call ClearRow |
| 8 | 1010 |
pop af |
1011 |
cp d |
|
1012 |
jr z, p01loc_5C28 |
|
| 4 | 1013 |
push af |
| 8 | 1014 |
ld a, d |
1015 |
add a, 8 |
|
1016 |
jr p01loc_5C1B |
|
| 4 | 1017 |
|
| 7 | 1018 |
p01loc_5C28: |
| 4 | 1019 |
ei |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1020 |
bit appTextSave, (iy+appFlags) |
| 8 | 1021 |
ret z |
1022 |
ld a, (winTop) |
|
1023 |
ld b, a |
|
1024 |
ld a, (winTop+1) |
|
1025 |
sub b |
|
| 44 | 1026 |
call ATimes16 |
| 8 | 1027 |
dec a |
1028 |
ld c, a |
|
1029 |
ld a, (winTop) |
|
| 44 | 1030 |
call ATimes16 |
| 8 | 1031 |
ld l, a |
1032 |
ld h, 0 |
|
1033 |
ld b, h |
|
1034 |
ld de, textShadow |
|
1035 |
add hl, de |
|
1036 |
ld e, l |
|
1037 |
ld d, h |
|
1038 |
inc de |
|
| 44 | 1039 |
ld (hl), 20h |
| 4 | 1040 |
ldir |
1041 |
ret |
|
1042 |
||
| 7 | 1043 |
EraseEOL: |
| 4 | 1044 |
push af |
| 8 | 1045 |
bit 1, (iy+2Ah) |
1046 |
jr z, p01loc_5C5D |
|
1047 |
pop af |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1048 |
call j_VEraseEOL |
| 4 | 1049 |
ret |
| 7 | 1050 |
p01loc_5C5D: |
| 4 | 1051 |
push bc |
1052 |
push de |
|
1053 |
push hl |
|
| 8 | 1054 |
ld a, (curRow+1) |
| 4 | 1055 |
push af |
| 8 | 1056 |
sub 10h |
1057 |
jr nc, p01loc_5C79 |
|
| 4 | 1058 |
neg |
| 8 | 1059 |
ld b, a |
| 44 | 1060 |
ld a, 20h |
| 8 | 1061 |
dec b |
1062 |
jr z, p01loc_5C75 |
|
| 7 | 1063 |
p01loc_5C70: |
| 4 | 1064 |
call PutC |
1065 |
djnz p01loc_5C70 |
|
| 7 | 1066 |
p01loc_5C75: |
| 4 | 1067 |
call PutMap |
1068 |
ei |
|
| 7 | 1069 |
p01loc_5C79: |
| 8 | 1070 |
pop af |
1071 |
ld (curRow+1), a |
|
1072 |
jp p01loc_56A3 |
|
| 4 | 1073 |
|
1074 |
EraseEOW: |
|
1075 |
push af |
|
1076 |
push hl |
|
| 8 | 1077 |
ld hl, (curRow) |
| 4 | 1078 |
push hl |
| 8 | 1079 |
ld a, l |
1080 |
ld hl, winBtm |
|
1081 |
sub (hl) |
|
1082 |
jr z, p01loc_5C98 |
|
| 7 | 1083 |
p01loc_5C8D: |
| 4 | 1084 |
call EraseEOL |
| 8 | 1085 |
inc a |
1086 |
jr z, p01loc_5C98 |
|
| 4 | 1087 |
call newline |
| 8 | 1088 |
jr p01loc_5C8D |
| 7 | 1089 |
p01loc_5C98: |
| 8 | 1090 |
pop hl |
1091 |
ld (curRow), hl |
|
1092 |
pop hl |
|
1093 |
pop af |
|
| 4 | 1094 |
ret |
1095 |
||
| 44 | 1096 |
HomeUp: push hl |
| 8 | 1097 |
ld hl, (winTop) |
1098 |
ld h, 0 |
|
1099 |
ld (curRow), hl |
|
1100 |
pop hl |
|
| 4 | 1101 |
ret |
1102 |
||
| 7 | 1103 |
getcurloc: |
| 4 | 1104 |
push af |
1105 |
push bc |
|
1106 |
push de |
|
| 8 | 1107 |
ld hl, (curRow) |
1108 |
ld a, l |
|
| 44 | 1109 |
call ATimes16 |
| 8 | 1110 |
add a, h |
1111 |
ld l, a |
|
1112 |
ld h, 0 |
|
1113 |
ld de, textShadow |
|
1114 |
add hl, de |
|
1115 |
pop de |
|
1116 |
pop bc |
|
1117 |
pop af |
|
| 4 | 1118 |
ret |
1119 |
||
1120 |
VPutMapRec: |
|
1121 |
call p01sub_5CCC |
|
| 8 | 1122 |
res 6, (iy+32h) |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1123 |
res fracDrawLFont, (iy+fontFlags) |
| 4 | 1124 |
ret |
1125 |
||
| 7 | 1126 |
p01sub_5CCC: |
| 4 | 1127 |
push bc |
| 8 | 1128 |
ld b, a |
1129 |
ld a, i |
|
| 4 | 1130 |
push af |
| 8 | 1131 |
ld a, b |
| 4 | 1132 |
di |
1133 |
push hl |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1134 |
res fracDrawLFont, (iy+fontFlags) |
| 8 | 1135 |
cp 8 |
1136 |
jr z, p01loc_5D19 |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1137 |
res fracDrawLFont, (iy+fontFlags) |
| 8 | 1138 |
jr p01loc_5D19 |
| 4 | 1139 |
|
| 7 | 1140 |
LoadPattern: |
| 8 | 1141 |
ld l, a |
1142 |
ld h, 0 |
|
1143 |
add hl, hl |
|
1144 |
add hl, hl |
|
1145 |
add hl, hl |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1146 |
bit fracDrawLFont, (iy+fontFlags) |
| 8 | 1147 |
jr z, p01loc_5CF2 |
| 4 | 1148 |
call Page0Call_3C03 |
1149 |
ret |
|
1150 |
||
| 7 | 1151 |
p01loc_5CF2: |
| 8 | 1152 |
bit 6, (iy+32h) |
1153 |
jr z, p01loc_5D0A |
|
| 4 | 1154 |
call Page0Call_3BC7 |
| 8 | 1155 |
ld de, 8461h |
1156 |
ld hl, 8460h |
|
1157 |
ld bc, 7 |
|
| 4 | 1158 |
lddr |
| 8 | 1159 |
ex de, hl |
1160 |
ld (hl), 5 |
|
| 4 | 1161 |
ret |
1162 |
||
| 7 | 1163 |
p01loc_5D0A: |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1164 |
call j_Load_SFont |
| 4 | 1165 |
ret |
1166 |
||
| 44 | 1167 |
VPutMap:push bc |
| 8 | 1168 |
ld b, a |
1169 |
ld a, i |
|
| 4 | 1170 |
push af |
| 8 | 1171 |
ld a, b |
| 4 | 1172 |
di |
1173 |
push hl |
|
1174 |
call LoadPattern |
|
| 7 | 1175 |
p01loc_5D19: |
| 4 | 1176 |
push hl |
| 8 | 1177 |
pop ix |
1178 |
ld e, (ix+0) |
|
1179 |
ld d, 0 |
|
1180 |
ld hl, LCDTable-1 |
|
1181 |
add hl, de |
|
1182 |
ld d, (hl) |
|
| 4 | 1183 |
push de |
| 8 | 1184 |
ld a, (penCol+1) |
1185 |
ld b, a |
|
| 44 | 1186 |
or 80h |
| 8 | 1187 |
ld (curXRow), a |
| 4 | 1188 |
call p01sub_55E5 |
1189 |
call SetXUp |
|
1190 |
call p01sub_6100 |
|
| 8 | 1191 |
ld a, (penCol) |
1192 |
ld e, a |
|
| 4 | 1193 |
srl a |
1194 |
srl a |
|
1195 |
srl a |
|
| 44 | 1196 |
or 20h |
| 8 | 1197 |
ld (curY), a |
| 4 | 1198 |
call lcd_busy |
| 8 | 1199 |
out (10h), a |
1200 |
ld d, 0 |
|
1201 |
add hl, de |
|
1202 |
ld a, e |
|
1203 |
pop de |
|
1204 |
add a, e |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1205 |
bit write_on_graph, (iy+sGrFlags) |
| 8 | 1206 |
jr z, p01loc_5D6C |
| 4 | 1207 |
call Bit_VertSplit |
| 8 | 1208 |
jr z, p01loc_5D6C |
1209 |
bit 3, (iy+11h) |
|
1210 |
jr nz, p01loc_5D68 |
|
| 44 | 1211 |
cp 30h |
| 8 | 1212 |
jr p01loc_5D82 |
| 7 | 1213 |
p01loc_5D68: |
| 8 | 1214 |
cp 17h |
1215 |
jr p01loc_5D82 |
|
| 7 | 1216 |
p01loc_5D6C: |
| 8 | 1217 |
bit 3, (iy+11h) |
1218 |
jr z, p01loc_5D76 |
|
| 44 | 1219 |
cp 30h |
| 8 | 1220 |
jr p01loc_5D82 |
| 7 | 1221 |
p01loc_5D76: |
| 8 | 1222 |
bit 4, (iy+24h) |
1223 |
jr z, p01loc_5D80 |
|
| 44 | 1224 |
cp 61h |
| 8 | 1225 |
jr p01loc_5D82 |
| 7 | 1226 |
p01loc_5D80: |
| 44 | 1227 |
cp 60h |
| 7 | 1228 |
p01loc_5D82: |
| 4 | 1229 |
ccf |
| 8 | 1230 |
jp c, p01loc_5E78 |
| 4 | 1231 |
push de |
| 8 | 1232 |
ld (penCol), a |
1233 |
ld a, l |
|
1234 |
and 7 |
|
1235 |
ld c, a |
|
| 4 | 1236 |
srl h |
1237 |
rr l |
|
1238 |
srl h |
|
1239 |
rr l |
|
1240 |
srl h |
|
1241 |
rr l |
|
| 8 | 1242 |
ld de, plotSScreen |
1243 |
add hl, de |
|
1244 |
pop de |
|
1245 |
ld a, (customHeight) |
|
1246 |
ld b, a |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1247 |
bit customFont, (iy+fontFlags) |
| 8 | 1248 |
jr nz, p01loc_5DC0 |
1249 |
ld b, 7 |
|
1250 |
bit 6, (iy+32h) |
|
1251 |
jr nz, p01loc_5DC0 |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1252 |
bit fracDrawLFont, (iy+fontFlags) |
| 8 | 1253 |
jr nz, p01loc_5DBF |
1254 |
ld b, 6 |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1255 |
bit textEraseBelow, (iy+textFlags) |
| 8 | 1256 |
jr z, p01loc_5DC0 |
| 7 | 1257 |
p01loc_5DBF: |
| 8 | 1258 |
inc b |
| 7 | 1259 |
p01loc_5DC0: |
| 8 | 1260 |
ld a, 8 |
1261 |
sub c |
|
1262 |
sub (ix+0) |
|
1263 |
inc ix |
|
1264 |
jp m, p01loc_5E0E |
|
1265 |
ld c, a |
|
1266 |
inc c |
|
| 7 | 1267 |
p01loc_5DCD: |
| 4 | 1268 |
push bc |
| 8 | 1269 |
ld b, c |
1270 |
ld a, (hl) |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1271 |
bit textWrite, (iy+sGrFlags) |
| 4 | 1272 |
call z, sOK |
| 8 | 1273 |
jr p01loc_5DDA |
| 7 | 1274 |
p01loc_5DD9: |
| 4 | 1275 |
rrca |
| 7 | 1276 |
p01loc_5DDA: |
| 4 | 1277 |
djnz p01loc_5DD9 |
1278 |
call p01sub_5E81 |
|
| 8 | 1279 |
jr p01loc_5DE2 |
| 7 | 1280 |
p01loc_5DE1: |
| 4 | 1281 |
rlca |
| 7 | 1282 |
p01loc_5DE2: |
| 4 | 1283 |
djnz p01loc_5DE1 |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1284 |
bit textWrite, (iy+sGrFlags) |
| 8 | 1285 |
jr z, p01loc_5DF4 |
1286 |
ld (hl), a |
|
| 4 | 1287 |
push de |
| 8 | 1288 |
ld de, 0Ch |
1289 |
add hl, de |
|
1290 |
pop de |
|
1291 |
pop bc |
|
1292 |
jr p01loc_5E03 |
|
| 7 | 1293 |
p01loc_5DF4: |
| 4 | 1294 |
call lcd_busy |
| 8 | 1295 |
out (11h), a |
1296 |
ld hl, curXRow |
|
1297 |
inc (hl) |
|
1298 |
pop bc |
|
1299 |
ld a, (hl) |
|
| 44 | 1300 |
cp 0C0h |
| 8 | 1301 |
jr nc, p01loc_5E05 |
| 7 | 1302 |
p01loc_5E03: |
| 4 | 1303 |
djnz p01loc_5DCD |
| 7 | 1304 |
p01loc_5E05: |
| 8 | 1305 |
pop hl |
1306 |
pop af |
|
1307 |
jp po, p01loc_5E0B |
|
| 4 | 1308 |
ei |
| 7 | 1309 |
p01loc_5E0B: |
| 8 | 1310 |
pop bc |
1311 |
xor a |
|
| 4 | 1312 |
ret |
| 7 | 1313 |
p01loc_5E0E: |
| 4 | 1314 |
neg |
| 8 | 1315 |
ld c, a |
| 7 | 1316 |
p01loc_5E11: |
| 4 | 1317 |
push bc |
| 8 | 1318 |
ld b, c |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1319 |
bit textWrite, (iy+sGrFlags) |
| 8 | 1320 |
jr z, p01loc_5E1E |
1321 |
ld a, (hl) |
|
1322 |
inc hl |
|
1323 |
ld e, (hl) |
|
1324 |
jr p01loc_5E30 |
|
| 7 | 1325 |
p01loc_5E1E: |
| 4 | 1326 |
call sOK |
1327 |
push af |
|
| 8 | 1328 |
ld a, (curY) |
1329 |
inc a |
|
| 4 | 1330 |
call lcd_busy |
| 8 | 1331 |
out (10h), a |
| 4 | 1332 |
call sOK |
| 8 | 1333 |
ld e, a |
1334 |
pop af |
|
| 7 | 1335 |
p01loc_5E30: |
| 4 | 1336 |
sla e |
1337 |
rla |
|
| 8 | 1338 |
jr nc, p01loc_5E36 |
1339 |
inc e |
|
| 7 | 1340 |
p01loc_5E36: |
| 4 | 1341 |
djnz p01loc_5E30 |
1342 |
call p01sub_5E81 |
|
| 7 | 1343 |
p01loc_5E3B: |
| 4 | 1344 |
srl a |
1345 |
rr e |
|
| 8 | 1346 |
jr nc, p01loc_5E43 |
| 44 | 1347 |
add a, 80h |
| 7 | 1348 |
p01loc_5E43: |
| 4 | 1349 |
djnz p01loc_5E3B |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1350 |
bit textWrite, (iy+sGrFlags) |
| 8 | 1351 |
jr z, p01loc_5E57 |
1352 |
ld (hl), e |
|
1353 |
dec hl |
|
1354 |
ld (hl), a |
|
| 4 | 1355 |
push de |
| 8 | 1356 |
ld de, 0Ch |
1357 |
add hl, de |
|
1358 |
pop de |
|
1359 |
pop bc |
|
1360 |
jr p01loc_5E74 |
|
| 7 | 1361 |
p01loc_5E57: |
| 4 | 1362 |
push af |
| 8 | 1363 |
ld a, e |
| 4 | 1364 |
call p01sub_55B5 |
| 8 | 1365 |
ld a, (curY) |
| 4 | 1366 |
call lcd_busy |
| 8 | 1367 |
out (10h), a |
1368 |
pop af |
|
| 4 | 1369 |
call lcd_busy |
| 8 | 1370 |
out (11h), a |
1371 |
ld hl, curXRow |
|
1372 |
inc (hl) |
|
1373 |
pop bc |
|
1374 |
ld a, (hl) |
|
| 44 | 1375 |
cp 0C0h |
| 8 | 1376 |
jr nc, p01loc_5E05 |
| 7 | 1377 |
p01loc_5E74: |
| 4 | 1378 |
djnz p01loc_5E11 |
| 8 | 1379 |
jr p01loc_5E05 |
| 7 | 1380 |
p01loc_5E78: |
| 8 | 1381 |
pop hl |
1382 |
pop af |
|
1383 |
jp po, p01loc_5E7E |
|
| 4 | 1384 |
ei |
| 7 | 1385 |
p01loc_5E7E: |
| 8 | 1386 |
pop bc |
| 4 | 1387 |
scf |
1388 |
ret |
|
1389 |
||
| 7 | 1390 |
p01sub_5E81: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1391 |
bit textInverse, (iy+textFlags) |
| 8 | 1392 |
jr z, p01loc_5E8E |
1393 |
ld b, a |
|
1394 |
ld a, 0FFh |
|
1395 |
xor d |
|
1396 |
or b |
|
1397 |
jr p01loc_5E8F |
|
| 7 | 1398 |
p01loc_5E8E: |
| 8 | 1399 |
and d |
| 7 | 1400 |
p01loc_5E8F: |
| 8 | 1401 |
xor (ix+0) |
1402 |
inc ix |
|
1403 |
ld b, c |
|
| 4 | 1404 |
ret |
1405 |
||
1406 |
LCDTable: |
|
| 44 | 1407 |
.db 0FEh |
1408 |
.db 0FCh |
|
1409 |
.db 0F8h |
|
1410 |
.db 0F0h |
|
1411 |
.db 0E0h |
|
1412 |
.db 0C0h |
|
| 4 | 1413 |
|
| 44 | 1414 |
VPutS: push af |
| 4 | 1415 |
push de |
1416 |
push ix |
|
| 7 | 1417 |
p01loc_5EA0: |
| 8 | 1418 |
ld a, (hl) |
1419 |
inc hl |
|
1420 |
or a |
|
1421 |
jr z, p01loc_5EAA |
|
| 4 | 1422 |
call VPutMap |
| 8 | 1423 |
jr nc, p01loc_5EA0 |
| 7 | 1424 |
p01loc_5EAA: |
| 8 | 1425 |
pop ix |
1426 |
pop de |
|
1427 |
pop af |
|
| 4 | 1428 |
ret |
1429 |
||
| 44 | 1430 |
VPutSN: push af |
| 4 | 1431 |
push de |
1432 |
push ix |
|
| 7 | 1433 |
p01loc_5EB3: |
| 8 | 1434 |
ld a, (hl) |
1435 |
inc hl |
|
| 4 | 1436 |
call VPutMap |
| 8 | 1437 |
jr c, p01loc_5EBC |
| 4 | 1438 |
djnz p01loc_5EB3 |
| 7 | 1439 |
p01loc_5EBC: |
| 8 | 1440 |
pop ix |
1441 |
pop de |
|
1442 |
pop af |
|
| 4 | 1443 |
ret |
1444 |
||
| 44 | 1445 |
vputsnG:scf |
| 4 | 1446 |
push af |
1447 |
push de |
|
1448 |
push ix |
|
| 7 | 1449 |
p01loc_5EC6: |
| 8 | 1450 |
bit 4, (iy+11h) |
1451 |
jr z, p01loc_5F15 |
|
1452 |
ld a, (hl) |
|
| 4 | 1453 |
push hl |
1454 |
push bc |
|
| 8 | 1455 |
ld l, a |
1456 |
ld h, 0 |
|
1457 |
add hl, hl |
|
1458 |
add hl, hl |
|
1459 |
add hl, hl |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1460 |
call j_SFont_Len |
| 8 | 1461 |
ld a, (penCol) |
1462 |
add a, b |
|
| 4 | 1463 |
call Bit_VertSplit |
| 8 | 1464 |
jr z, p01loc_5EEF |
1465 |
bit 3, (iy+11h) |
|
1466 |
jr nz, p01loc_5EEB |
|
| 44 | 1467 |
cp 2Ch |
| 8 | 1468 |
jr p01loc_5EFB |
| 7 | 1469 |
p01loc_5EEB: |
| 8 | 1470 |
cp 14h |
1471 |
jr p01loc_5EFB |
|
| 7 | 1472 |
p01loc_5EEF: |
| 8 | 1473 |
bit 3, (iy+11h) |
1474 |
jr z, p01loc_5EF9 |
|
| 44 | 1475 |
cp 2Ch |
| 8 | 1476 |
jr p01loc_5EFB |
| 7 | 1477 |
p01loc_5EF9: |
| 44 | 1478 |
cp 5Ch |
| 7 | 1479 |
p01loc_5EFB: |
| 4 | 1480 |
ccf |
| 8 | 1481 |
jr nc, p01loc_5F13 |
| 44 | 1482 |
ld a, 0CEh |
| 4 | 1483 |
call VPutMap |
| 8 | 1484 |
pop bc |
1485 |
pop hl |
|
| 7 | 1486 |
p01loc_5F05: |
| 8 | 1487 |
pop ix |
1488 |
pop de |
|
1489 |
pop af |
|
1490 |
res 6, (iy+32h) |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1491 |
res fracDrawLFont, (iy+fontFlags) |
| 8 | 1492 |
or a |
| 4 | 1493 |
ret |
| 7 | 1494 |
p01loc_5F13: |
| 8 | 1495 |
pop bc |
1496 |
pop hl |
|
| 7 | 1497 |
p01loc_5F15: |
| 8 | 1498 |
bit 4, (iy+24h) |
1499 |
jr z, p01loc_5F1F |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1500 |
set fracDrawLFont, (iy+fontFlags) |
| 7 | 1501 |
p01loc_5F1F: |
| 8 | 1502 |
ld a, (hl) |
1503 |
inc hl |
|
| 4 | 1504 |
call VPutMap |
| 8 | 1505 |
jr c, p01loc_5F05 |
| 4 | 1506 |
djnz p01loc_5EC6 |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1507 |
res fracDrawLFont, (iy+fontFlags) |
| 8 | 1508 |
jr p01loc_5EBC |
| 4 | 1509 |
|
| 7 | 1510 |
vputsnT: |
| 8 | 1511 |
ld a, (hl) |
| 4 | 1512 |
push hl |
1513 |
push bc |
|
| 8 | 1514 |
ld l, a |
1515 |
ld h, 0 |
|
1516 |
add hl, hl |
|
1517 |
add hl, hl |
|
1518 |
add hl, hl |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1519 |
call j_SFont_Len |
| 8 | 1520 |
ld a, (penCol) |
1521 |
add a, b |
|
| 44 | 1522 |
cp 5Ch |
| 4 | 1523 |
ccf |
| 8 | 1524 |
jr nc, p01loc_5F4C |
| 44 | 1525 |
ld a, 0CEh |
| 4 | 1526 |
call VPutMap |
| 8 | 1527 |
pop bc |
1528 |
pop hl |
|
| 7 | 1529 |
p01loc_5F4A: |
| 8 | 1530 |
or a |
| 4 | 1531 |
ret |
| 7 | 1532 |
p01loc_5F4C: |
| 8 | 1533 |
pop bc |
1534 |
pop hl |
|
1535 |
ld a, (hl) |
|
1536 |
inc hl |
|
| 4 | 1537 |
call VPutMap |
| 8 | 1538 |
jr c, p01loc_5F4A |
| 4 | 1539 |
djnz vputsnT |
1540 |
scf |
|
1541 |
ret |
|
1542 |
||
| 7 | 1543 |
RunIndicOn: |
| 4 | 1544 |
push af |
1545 |
push bc |
|
1546 |
push de |
|
1547 |
push hl |
|
| 44 | 1548 |
ld a, 0F0h |
| 8 | 1549 |
ld (indicBusy), a |
1550 |
ld a, 1 |
|
1551 |
ld (indicCounter), a |
|
| 22 | 1552 |
call HandleRunIndicator |
| 4 | 1553 |
ei |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1554 |
set indicRun, (iy+indicFlags) |
| 8 | 1555 |
jp p01loc_56A3 |
| 4 | 1556 |
|
| 7 | 1557 |
RunIndicOff: |
| 4 | 1558 |
push bc |
1559 |
push de |
|
1560 |
push hl |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1561 |
res indicRun, (iy+indicFlags) |
| 8 | 1562 |
ld b, 8 |
| 4 | 1563 |
call p01sub_60C2 |
| 8 | 1564 |
ld d, a |
| 7 | 1565 |
p01loc_5F7F: |
| 8 | 1566 |
ld a, d |
| 4 | 1567 |
call p01sub_55E5 |
1568 |
call SetXUp |
|
1569 |
call lcd_busy |
|
| 8 | 1570 |
in a, (11h) |
| 4 | 1571 |
call lcd_busy |
| 8 | 1572 |
in a, (11h) |
| 44 | 1573 |
and 0FEh |
| 8 | 1574 |
ld e, a |
1575 |
ld a, d |
|
| 4 | 1576 |
call p01sub_55E5 |
1577 |
call SetXUp |
|
| 8 | 1578 |
ld a, e |
| 4 | 1579 |
call lcd_busy |
| 8 | 1580 |
out (11h), a |
1581 |
inc d |
|
| 4 | 1582 |
djnz p01loc_5F7F |
| 8 | 1583 |
pop hl |
1584 |
pop de |
|
1585 |
pop bc |
|
| 4 | 1586 |
ei |
1587 |
ret |
|
1588 |
||
1589 |
saveCmdShadow: |
|
1590 |
call saveShadow |
|
| 8 | 1591 |
ld de, cmdShadow |
1592 |
ld hl, textShadow |
|
| 44 | 1593 |
ld bc, 80h |
| 4 | 1594 |
ldir |
| 8 | 1595 |
ld hl, (curRow) |
1596 |
ld (cmdShadCur), hl |
|
| 4 | 1597 |
ret |
1598 |
||
| 7 | 1599 |
saveShadow: |
| 8 | 1600 |
ld hl, (curRow) |
1601 |
ld (textShadCur), hl |
|
1602 |
ld a, (winTop) |
|
1603 |
ld (textShadTop), a |
|
1604 |
ld a, (unk_8A02) |
|
1605 |
ld (textShadAlph), a |
|
1606 |
ld a, (unk_89F5) |
|
1607 |
and 10h |
|
1608 |
ld (textShadIns), a |
|
| 4 | 1609 |
ret |
1610 |
||
| 44 | 1611 |
#ifndef DEVIATE_FROM_ORIGINAL_FILE |
| 8 | 1612 |
ld a, (textShadTop) |
1613 |
ld (winTop), a |
|
1614 |
ld a, 8 |
|
1615 |
ld hl, menuAppDepth |
|
1616 |
sub (hl) |
|
1617 |
cp 6 |
|
1618 |
jr nc, p01loc_5FEA |
|
1619 |
ld a, 6 |
|
| 7 | 1620 |
p01loc_5FEA: |
| 8 | 1621 |
ld (winTop+1), a |
1622 |
ld hl, 0 |
|
1623 |
jr p01loc_601B |
|
| 44 | 1624 |
#endif |
| 4 | 1625 |
|
1626 |
rstrShadow: |
|
| 8 | 1627 |
ld a, (textShadTop) |
1628 |
ld (winTop), a |
|
1629 |
ld a, 8 |
|
1630 |
ld hl, menuAppDepth |
|
1631 |
sub (hl) |
|
1632 |
cp 6 |
|
1633 |
jr nc, p01loc_6004 |
|
1634 |
ld a, 6 |
|
| 7 | 1635 |
p01loc_6004: |
| 8 | 1636 |
ld (winTop+1), a |
1637 |
ld hl, 0 |
|
| 4 | 1638 |
call CheckSplitFlag |
| 8 | 1639 |
jr z, p01loc_601B |
1640 |
sub 4 |
|
1641 |
ld l, 4 |
|
1642 |
ld (curRow), hl |
|
1643 |
ld hl, 8548h |
|
1644 |
jr p01loc_6021 |
|
| 7 | 1645 |
p01loc_601B: |
| 8 | 1646 |
ld (curRow), hl |
1647 |
ld hl, textShadow |
|
| 7 | 1648 |
p01loc_6021: |
| 44 | 1649 |
call ATimes16 |
| 8 | 1650 |
ld b, a |
1651 |
dec b |
|
| 7 | 1652 |
p01loc_6026: |
| 8 | 1653 |
ld a, (hl) |
1654 |
inc hl |
|
| 4 | 1655 |
call PutC |
1656 |
djnz p01loc_6026 |
|
| 8 | 1657 |
ld a, (hl) |
| 4 | 1658 |
call PutMap |
| 7 | 1659 |
BCALL_4D6B: |
| 8 | 1660 |
ld hl, (textShadCur) |
1661 |
ld (curRow), hl |
|
1662 |
ld a, (textShadAlph) |
|
1663 |
ld (unk_8A02), a |
|
1664 |
ld a, (textShadIns) |
|
| 44 | 1665 |
and 0EFh |
| 8 | 1666 |
ld hl, 89F5h |
1667 |
or (hl) |
|
1668 |
ld (hl), a |
|
| 4 | 1669 |
ret |
1670 |
||
1671 |
rstrpartial: |
|
| 8 | 1672 |
ld a, (textShadTop) |
1673 |
ld (winTop), a |
|
1674 |
ld a, 8 |
|
1675 |
ld (winTop+1), a |
|
1676 |
jr BCALL_4D6B |
|
| 4 | 1677 |
rstrCurRow: |
| 8 | 1678 |
ld hl, (textShadCur) |
1679 |
ld h, 0 |
|
1680 |
ld (curRow), hl |
|
| 4 | 1681 |
call getcurloc |
| 8 | 1682 |
ld b, 0Fh |
1683 |
jr p01loc_6026 |
|
| 4 | 1684 |
|
1685 |
rstrUnderMenu: |
|
| 8 | 1686 |
ld a, (curRow) |
1687 |
cp 6 |
|
1688 |
ret c |
|
1689 |
ld hl, (curRow) |
|
| 4 | 1690 |
push hl |
| 8 | 1691 |
sub a |
1692 |
ld (curRow+1), a |
|
1693 |
ld b, 0Fh |
|
| 4 | 1694 |
call getcurloc |
| 7 | 1695 |
p01loc_6077: |
| 8 | 1696 |
ld a, (hl) |
1697 |
inc hl |
|
| 4 | 1698 |
call PutC |
1699 |
djnz p01loc_6077 |
|
| 8 | 1700 |
ld a, (hl) |
| 4 | 1701 |
call PutMap |
| 8 | 1702 |
pop hl |
1703 |
ld (curRow), hl |
|
| 4 | 1704 |
ret |
1705 |
||
1706 |
rstrbotrow: |
|
| 8 | 1707 |
ld hl, (curRow) |
| 4 | 1708 |
push hl |
| 8 | 1709 |
sub a |
1710 |
ld (curRow+1), a |
|
1711 |
ld b, 0Fh |
|
1712 |
ld hl, 978Fh |
|
1713 |
jr p01loc_6077 |
|
| 4 | 1714 |
|
| 44 | 1715 |
saveTR: bit indicInUse, (iy+indicFlags) |
| 8 | 1716 |
ret nz |
| 4 | 1717 |
push af |
1718 |
push bc |
|
1719 |
push de |
|
1720 |
push hl |
|
1721 |
push ix |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1722 |
set indicInUse, (iy+indicFlags) |
| 8 | 1723 |
ld b, 8 |
1724 |
ld ix, indicMem |
|
| 4 | 1725 |
call p01sub_60C2 |
1726 |
call lcd_busy |
|
| 8 | 1727 |
in a, (11h) |
| 7 | 1728 |
p01loc_60B3: |
| 4 | 1729 |
call lcd_busy |
| 8 | 1730 |
in a, (11h) |
1731 |
ld (ix+0), a |
|
1732 |
inc ix |
|
| 4 | 1733 |
djnz p01loc_60B3 |
| 8 | 1734 |
jp p01loc_56A1 |
| 4 | 1735 |
|
| 7 | 1736 |
p01sub_60C2: |
| 4 | 1737 |
di |
| 44 | 1738 |
ld a, 2Bh |
| 4 | 1739 |
call lcd_busy |
| 8 | 1740 |
out (10h), a |
| 44 | 1741 |
ld a, 80h |
| 4 | 1742 |
call p01sub_55E5 |
1743 |
call SetXUp |
|
1744 |
ret |
|
1745 |
||
1746 |
restoreTR: |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1747 |
bit indicInUse, (iy+indicFlags) |
| 8 | 1748 |
ret z |
| 4 | 1749 |
push af |
1750 |
push bc |
|
1751 |
push de |
|
1752 |
push hl |
|
1753 |
push ix |
|
| 8 | 1754 |
ld b, 8 |
1755 |
ld ix, indicMem |
|
| 4 | 1756 |
call p01sub_60C2 |
| 7 | 1757 |
p01loc_60E7: |
| 8 | 1758 |
ld a, (ix+0) |
1759 |
inc ix |
|
| 4 | 1760 |
call lcd_busy |
| 8 | 1761 |
out (11h), a |
| 4 | 1762 |
djnz p01loc_60E7 |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1763 |
res indicInUse, (iy+indicFlags) |
| 4 | 1764 |
ei |
| 8 | 1765 |
jp p01loc_56A1 |
| 4 | 1766 |
|
| 44 | 1767 |
ATimes16: |
| 8 | 1768 |
add a, a |
1769 |
add a, a |
|
1770 |
add a, a |
|
1771 |
add a, a |
|
| 4 | 1772 |
ret |
1773 |
||
| 7 | 1774 |
p01sub_6100: |
| 8 | 1775 |
inc b |
1776 |
ld hl, 0 |
|
| 44 | 1777 |
ld de, 60h |
| 8 | 1778 |
jr p01loc_610A |
| 7 | 1779 |
p01loc_6109: |
| 8 | 1780 |
add hl, de |
| 7 | 1781 |
p01loc_610A: |
| 4 | 1782 |
djnz p01loc_6109 |
1783 |
ret |
|
1784 |
||
1785 |
GetKeyPress: |
|
1786 |
call GETTOKSTRING |
|
| 8 | 1787 |
dec hl |
1788 |
ld a, (hl) |
|
| 4 | 1789 |
ret |
1790 |
||
1791 |
GetTokLen: |
|
1792 |
call GETTOKSTRING |
|
| 8 | 1793 |
ld a, (hl) |
| 4 | 1794 |
ret |
1795 |
||
1796 |
GET_TOK_STRNG: |
|
1797 |
push hl |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1798 |
call j_BUFPEEK3 |
| 4 | 1799 |
call GETTOKSTRING |
| 8 | 1800 |
ld a, (hl) |
1801 |
ld c, a |
|
1802 |
ld b, 0 |
|
1803 |
inc hl |
|
| 4 | 1804 |
push bc |
| 8 | 1805 |
ld de, OP3 |
| 4 | 1806 |
ldir |
| 8 | 1807 |
ex de, hl |
1808 |
ld (hl), 0 |
|
1809 |
pop bc |
|
1810 |
pop hl |
|
| 4 | 1811 |
ret |
1812 |
||
| 7 | 1813 |
GETTOKSTRING: |
| 8 | 1814 |
ld l, e |
1815 |
ld h, 0 |
|
1816 |
ld a, d |
|
1817 |
or a |
|
1818 |
jr z, p01loc_61A6 |
|
1819 |
ld de, StringTable4200 |
|
| 44 | 1820 |
cp 5Dh |
| 8 | 1821 |
jr c, p01loc_61A9 |
1822 |
ld de, StringTable4214 |
|
1823 |
jr z, p01loc_61A9 |
|
1824 |
ld de, StringTable4220 |
|
| 44 | 1825 |
cp 60h |
| 8 | 1826 |
jr nc, p01loc_616A |
1827 |
ld a, l |
|
1828 |
res 4, l |
|
1829 |
bit 4, a |
|
1830 |
jr nz, p01loc_61A9 |
|
1831 |
ld de, StringTable4234 |
|
1832 |
res 5, l |
|
1833 |
bit 5, a |
|
1834 |
jr nz, p01loc_61A9 |
|
1835 |
ld de, StringTable424C |
|
1836 |
res 6, l |
|
1837 |
bit 6, a |
|
1838 |
jr nz, p01loc_61A9 |
|
1839 |
res 7, l |
|
1840 |
ld de, StringTable4258 |
|
1841 |
jr p01loc_61A9 |
|
| 7 | 1842 |
p01loc_616A: |
| 8 | 1843 |
ld de, StringTable425E |
| 44 | 1844 |
cp 61h |
| 8 | 1845 |
jr c, p01loc_61A9 |
1846 |
ld de, StringTable4272 |
|
1847 |
jr z, p01loc_61A9 |
|
1848 |
ld de, StringTable429A |
|
| 44 | 1849 |
cp 63h |
| 8 | 1850 |
jr c, p01loc_61A9 |
1851 |
ld de, StringTable4314 |
|
1852 |
jr z, p01loc_61A9 |
|
| 44 | 1853 |
cp 7Eh |
| 8 | 1854 |
jr z, p01loc_61A1 |
1855 |
ld de, StringTable4286 |
|
| 44 | 1856 |
cp 0BBh |
| 8 | 1857 |
jr c, p01loc_61A9 |
1858 |
ld de, StringTable43AA |
|
1859 |
ld a, l |
|
1860 |
jr nz, p01loc_619B |
|
| 44 | 1861 |
cp 0F6h |
| 8 | 1862 |
jr c, p01loc_61A9 |
| 44 | 1863 |
ld l, 0F6h |
| 8 | 1864 |
jr p01loc_61A9 |
| 7 | 1865 |
p01loc_619B: |
| 8 | 1866 |
cp 13h |
1867 |
jr c, p01loc_61A1 |
|
1868 |
ld l, 13h |
|
| 7 | 1869 |
p01loc_61A1: |
| 8 | 1870 |
ld de, StringTable4384 |
1871 |
jr p01loc_61A9 |
|
| 7 | 1872 |
p01loc_61A6: |
| 8 | 1873 |
ld de, StringTable4000 |
| 7 | 1874 |
p01loc_61A9: |
| 8 | 1875 |
add hl, hl |
1876 |
add hl, de |
|
1877 |
ld e, (hl) |
|
1878 |
inc hl |
|
1879 |
ld d, (hl) |
|
1880 |
ex de, hl |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
1881 |
bit tokenHookActive, (iy+hookflags3) |
| 8 | 1882 |
jr z, p01loc_61D8 |
1883 |
ld a, (hl) |
|
1884 |
ld (localTokStr), a |
|
| 4 | 1885 |
push bc |
1886 |
push hl |
|
| 8 | 1887 |
ld hl, StringTable4000+1 |
1888 |
ex de, hl |
|
1889 |
or a |
|
1890 |
sbc hl, de |
|
1891 |
ex de, hl |
|
1892 |
ld bc, 0 |
|
1893 |
or a |
|
1894 |
ld hl, 546h |
|
1895 |
sbc hl, de |
|
1896 |
jr nc, p01loc_61D3 |
|
1897 |
ld b, d |
|
1898 |
ld c, e |
|
1899 |
ld de, 0Ch |
|
| 7 | 1900 |
p01loc_61D3: |
| 8 | 1901 |
pop hl |
| 4 | 1902 |
call Page0Call_3C15 |
| 8 | 1903 |
pop bc |
| 7 | 1904 |
p01loc_61D8: |
| 8 | 1905 |
inc hl |
| 4 | 1906 |
ret |
1907 |
||
1908 |
SGetTokString: |
|
1909 |
call GETTOKSTRING |
|
| 8 | 1910 |
ld de, ioPrompt |
1911 |
ld bc, 11h |
|
| 4 | 1912 |
ldir |
| 8 | 1913 |
ld hl, ioPrompt |
| 4 | 1914 |
ret |
1915 |
||
1916 |
PUTBPATBUF2: |
|
1917 |
push bc |
|
1918 |
push de |
|
1919 |
push hl |
|
1920 |
push af |
|
| 8 | 1921 |
ld b, 1 |
1922 |
jr p01loc_61FB |
|
| 4 | 1923 |
|
1924 |
PUTBPATBUF: |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1925 |
call j_GetPrevTok |
| 4 | 1926 |
|
1927 |
putbPAT: |
|
| 8 | 1928 |
xor a |
| 4 | 1929 |
push bc |
1930 |
push de |
|
1931 |
push hl |
|
1932 |
push af |
|
| 8 | 1933 |
ld b, 0 |
| 7 | 1934 |
p01loc_61FB: |
| 4 | 1935 |
push bc |
1936 |
call GETTOKSTRING |
|
| 8 | 1937 |
ld b, (hl) |
1938 |
ld e, b |
|
1939 |
ld d, 0 |
|
1940 |
add hl, de |
|
| 7 | 1941 |
p01loc_6204: |
| 8 | 1942 |
ld a, (winLeftEdge) |
1943 |
pop de |
|
| 4 | 1944 |
push de |
| 8 | 1945 |
bit 0, d |
1946 |
jr nz, p01loc_6250 |
|
1947 |
ld a, (hl) |
|
| 44 | 1948 |
cp 0D6h |
| 8 | 1949 |
jr nz, p01loc_624F |
1950 |
ld hl, curCol |
|
1951 |
dec (hl) |
|
| 44 | 1952 |
ld a, 3Ah |
| 4 | 1953 |
call PutMap |
1954 |
call p01sub_5A3F |
|
| 8 | 1955 |
ld a, (curRow) |
1956 |
ld hl, winTop |
|
1957 |
cp (hl) |
|
1958 |
jp m, p01loc_6281 |
|
1959 |
ld hl, (editCursor) |
|
| 7 | 1960 |
p01loc_622B: |
| 8 | 1961 |
ld de, (editTop) |
1962 |
dec hl |
|
| 4 | 1963 |
call CpHLDE |
| 8 | 1964 |
jr c, p01loc_623E |
1965 |
inc hl |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1966 |
call j_GetPrevTok |
| 4 | 1967 |
call page0_17C7 |
| 8 | 1968 |
jr nz, p01loc_622B |
| 7 | 1969 |
p01loc_623E: |
| 8 | 1970 |
inc hl |
1971 |
ld de, (editCursor) |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
1972 |
call j_stringwidth |
| 8 | 1973 |
ld a, e |
1974 |
inc a |
|
1975 |
and 0Fh |
|
1976 |
ld (curRow+1), a |
|
1977 |
jr p01loc_6265 |
|
| 7 | 1978 |
p01loc_624F: |
| 8 | 1979 |
xor a |
| 7 | 1980 |
p01loc_6250: |
| 8 | 1981 |
ld c, a |
1982 |
ld a, (curRow+1) |
|
1983 |
dec a |
|
1984 |
jp m, p01loc_626C |
|
1985 |
cp c |
|
1986 |
jr c, p01loc_626C |
|
1987 |
ld (curRow+1), a |
|
| 7 | 1988 |
p01loc_625E: |
| 8 | 1989 |
ld a, (hl) |
1990 |
dec hl |
|
| 4 | 1991 |
call PutMap |
1992 |
djnz p01loc_6204 |
|
| 7 | 1993 |
p01loc_6265: |
| 8 | 1994 |
pop de |
1995 |
pop af |
|
| 4 | 1996 |
scf |
| 7 | 1997 |
p01loc_6268: |
| 8 | 1998 |
pop hl |
1999 |
pop de |
|
2000 |
pop bc |
|
| 4 | 2001 |
ret |
| 7 | 2002 |
p01loc_626C: |
| 8 | 2003 |
pop de |
2004 |
pop af |
|
2005 |
jr nz, p01loc_6283 |
|
| 4 | 2006 |
push af |
2007 |
push de |
|
2008 |
call p01sub_5A3F |
|
| 8 | 2009 |
ld a, (curRow) |
| 4 | 2010 |
push hl |
| 8 | 2011 |
ld hl, winTop |
2012 |
cp (hl) |
|
2013 |
pop hl |
|
2014 |
jp p, p01loc_625E |
|
| 7 | 2015 |
p01loc_6281: |
| 8 | 2016 |
pop de |
2017 |
pop af |
|
| 7 | 2018 |
p01loc_6283: |
| 8 | 2019 |
or a |
2020 |
jr p01loc_6268 |
|
| 4 | 2021 |
|
2022 |
putcCheckScrolL: |
|
2023 |
push af |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2024 |
res textScrolled, (iy+textFlags) |
| 4 | 2025 |
call GETTOKSTRING |
| 8 | 2026 |
ld a, (mcxCurApp) |
| 44 | 2027 |
cp 49h |
| 8 | 2028 |
jr nz, p01loc_62B2 |
2029 |
pop af |
|
2030 |
jr nz, p01loc_62AB |
|
| 4 | 2031 |
push hl |
| 8 | 2032 |
ld a, (hl) |
2033 |
ld de, (curRow) |
|
2034 |
add a, d |
|
2035 |
cp 10h |
|
2036 |
ld a, e |
|
2037 |
inc a |
|
| 4 | 2038 |
call nc, p01sub_5AD2 |
| 8 | 2039 |
pop hl |
| 4 | 2040 |
call PutPS |
2041 |
ret |
|
2042 |
||
| 7 | 2043 |
p01loc_62AB: |
| 4 | 2044 |
call PutPS |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2045 |
call j_DISPYEOS |
| 4 | 2046 |
ret |
2047 |
||
| 7 | 2048 |
p01loc_62B2: |
| 8 | 2049 |
pop af |
| 4 | 2050 |
call PutPS |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2051 |
bit textScrolled, (iy+textFlags) |
| 8 | 2052 |
ret z |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2053 |
call j_DispEOW |
| 4 | 2054 |
ret |
2055 |
||
2056 |
DispEOL: |
|
| 8 | 2057 |
ld a, (curRow+1) |
| 4 | 2058 |
push af |
| 8 | 2059 |
ld hl, (editTail) |
| 7 | 2060 |
p01loc_62C6: |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2061 |
call j_BUFPEEK1 |
| 8 | 2062 |
jr z, p01loc_62E8 |
2063 |
inc hl |
|
| 4 | 2064 |
push hl |
2065 |
call GETTOKSTRING |
|
| 8 | 2066 |
ld b, (hl) |
| 7 | 2067 |
p01loc_62D1: |
| 8 | 2068 |
inc hl |
2069 |
ld a, (curRow+1) |
|
2070 |
cp 0Fh |
|
2071 |
ld a, (hl) |
|
2072 |
jr z, p01loc_62E2 |
|
| 4 | 2073 |
call PutC |
2074 |
djnz p01loc_62D1 |
|
| 8 | 2075 |
pop hl |
2076 |
jr p01loc_62C6 |
|
| 7 | 2077 |
p01loc_62E2: |
| 4 | 2078 |
call PutMap |
| 8 | 2079 |
pop hl |
2080 |
jr p01loc_62EB |
|
| 7 | 2081 |
p01loc_62E8: |
| 4 | 2082 |
call EraseEOL |
| 7 | 2083 |
p01loc_62EB: |
| 8 | 2084 |
pop af |
2085 |
ld (curRow+1), a |
|
| 4 | 2086 |
ret |
2087 |
||
| 7 | 2088 |
fdispEOL: |
| 8 | 2089 |
bit 1, (iy+2Ah) |
2090 |
jr z, p01loc_62FA |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2091 |
call j_BCALL_4CCC |
| 4 | 2092 |
ret |
2093 |
||
| 7 | 2094 |
p01loc_62FA: |
| 8 | 2095 |
ld a, (curRow+1) |
2096 |
or a |
|
2097 |
ret z |
|
| 4 | 2098 |
call Page0Call_3C3F |
2099 |
push af |
|
| 8 | 2100 |
ld hl, (editTail) |
| 7 | 2101 |
p01loc_6306: |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2102 |
call j_BUFPEEK1 |
| 8 | 2103 |
jr z, p01loc_6349 |
2104 |
inc hl |
|
| 4 | 2105 |
push hl |
2106 |
call GETTOKSTRING |
|
| 8 | 2107 |
ld b, (hl) |
2108 |
inc hl |
|
| 7 | 2109 |
p01loc_6312: |
| 8 | 2110 |
ld a, (curRow+1) |
2111 |
cp 0Fh |
|
2112 |
jr z, p01loc_6323 |
|
2113 |
ld a, (hl) |
|
2114 |
inc hl |
|
| 4 | 2115 |
call PutC |
2116 |
djnz p01loc_6312 |
|
| 8 | 2117 |
pop hl |
2118 |
jr p01loc_6306 |
|
| 7 | 2119 |
p01loc_6323: |
| 8 | 2120 |
ld c, (hl) |
2121 |
pop hl |
|
2122 |
ld a, b |
|
2123 |
cp 2 |
|
2124 |
jr nc, p01loc_6335 |
|
2125 |
ld de, (editBtm) |
|
2126 |
or a |
|
2127 |
sbc hl, de |
|
2128 |
ld a, h |
|
2129 |
or l |
|
2130 |
jr z, p01loc_633D |
|
| 7 | 2131 |
p01loc_6335: |
| 8 | 2132 |
set 1, (iy+0Eh) |
| 44 | 2133 |
ld a, 0CEh |
| 8 | 2134 |
jr p01loc_6341 |
| 7 | 2135 |
p01loc_633D: |
| 8 | 2136 |
ld a, c |
| 4 | 2137 |
call Page0Call_3C3F |
| 7 | 2138 |
p01loc_6341: |
| 4 | 2139 |
call PutMap |
| 8 | 2140 |
pop af |
2141 |
ld (curRow+1), a |
|
| 4 | 2142 |
ret |
2143 |
||
| 7 | 2144 |
p01loc_6349: |
| 4 | 2145 |
call EraseEOL |
2146 |
call Page0Call_3C3F |
|
| 8 | 2147 |
pop af |
2148 |
ld (curRow+1), a |
|
| 4 | 2149 |
ret |
2150 |
||
| 7 | 2151 |
ClearRow: |
| 4 | 2152 |
di |
| 8 | 2153 |
ld d, a |
| 44 | 2154 |
ld e, 20h |
| 7 | 2155 |
p01loc_6358: |
| 8 | 2156 |
ld a, d |
| 4 | 2157 |
call p01sub_55E5 |
2158 |
call SetXUp |
|
| 8 | 2159 |
ld b, 8 |
2160 |
ld a, e |
|
| 4 | 2161 |
call lcd_busy |
| 8 | 2162 |
out (10h), a |
| 7 | 2163 |
p01loc_6367: |
| 8 | 2164 |
xor a |
| 4 | 2165 |
call lcd_busy |
| 8 | 2166 |
out (11h), a |
| 4 | 2167 |
djnz p01loc_6367 |
| 8 | 2168 |
inc e |
2169 |
ld a, e |
|
| 44 | 2170 |
cp 2Ch |
| 8 | 2171 |
jr nz, p01loc_6358 |
| 4 | 2172 |
ret |
2173 |
||
| 7 | 2174 |
MAKEROWCMD: |
| 8 | 2175 |
add a, a |
2176 |
add a, a |
|
2177 |
add a, a |
|
| 44 | 2178 |
add a, 80h |
| 4 | 2179 |
ret |
2180 |
||
2181 |
TOTOSTRP: |
|
| 8 | 2182 |
ld b, a |
| 7 | 2183 |
p01loc_637D: |
| 8 | 2184 |
ld a, (hl) |
2185 |
ld (de), a |
|
2186 |
inc de |
|
2187 |
ld a, (unk_865E) |
|
2188 |
inc a |
|
2189 |
ld (unk_865E), a |
|
2190 |
cp 10h |
|
2191 |
ret z |
|
2192 |
inc hl |
|
| 4 | 2193 |
djnz p01loc_637D |
| 8 | 2194 |
or 1 |
| 4 | 2195 |
ret |
2196 |
||
2197 |
SETVARNAME: |
|
| 8 | 2198 |
ld a, (OP1+1) |
2199 |
ld d, 0 |
|
| 44 | 2200 |
cp 5Ch |
| 8 | 2201 |
jr c, p01loc_63BA |
| 44 | 2202 |
cp 5Dh |
| 8 | 2203 |
ld d, a |
2204 |
ld a, (OP1M) |
|
2205 |
jr nz, p01loc_63BA |
|
2206 |
cp 6 |
|
2207 |
jr c, p01loc_63BA |
|
2208 |
ld hl, OP1M |
|
2209 |
ld de, ioPrompt |
|
| 7 | 2210 |
p01loc_63AB: |
| 8 | 2211 |
ld a, (hl) |
2212 |
or a |
|
2213 |
jr z, p01loc_63C7 |
|
| 44 | 2214 |
cp 5Bh |
| 8 | 2215 |
jr nz, p01loc_63B5 |
| 44 | 2216 |
ld a, 5Bh |
| 7 | 2217 |
p01loc_63B5: |
| 8 | 2218 |
ld (de), a |
2219 |
inc de |
|
2220 |
inc hl |
|
2221 |
jr p01loc_63AB |
|
| 7 | 2222 |
p01loc_63BA: |
| 8 | 2223 |
ld e, a |
| 4 | 2224 |
call GETTOKSTRING |
| 8 | 2225 |
ld c, (hl) |
2226 |
ld b, 0 |
|
2227 |
inc hl |
|
2228 |
ld de, ioPrompt |
|
| 4 | 2229 |
ldir |
| 7 | 2230 |
p01loc_63C7: |
| 8 | 2231 |
ld hl, {+}
|
2232 |
jp strcopy |
|
| 4 | 2233 |
+: .asc '=?',0 |
2234 |
DispDone: |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2235 |
bit localizeHookActive, (iy+hookflags3) |
| 8 | 2236 |
jr z, p01loc_63DC |
2237 |
ld a, 0Dh |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2238 |
call j_call_character_hook |
| 8 | 2239 |
ret z |
| 7 | 2240 |
p01loc_63DC: |
| 8 | 2241 |
ld hl, curCol |
2242 |
ld (hl), 0Ch |
|
2243 |
ld hl, aDone |
|
| 4 | 2244 |
call PutS |
2245 |
ret |
|
2246 |
||
| 7 | 2247 |
finishoutput: |
| 4 | 2248 |
call CpHLDE |
| 8 | 2249 |
ret z |
| 4 | 2250 |
push de |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2251 |
call j_BUFPEEK3 |
| 8 | 2252 |
inc hl |
| 4 | 2253 |
push hl |
2254 |
call GETTOKSTRING |
|
| 8 | 2255 |
ld b, (hl) |
| 7 | 2256 |
p01loc_63F6: |
| 8 | 2257 |
inc hl |
2258 |
ld a, (hl) |
|
| 4 | 2259 |
call PutC |
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
2260 |
call Page01_3CCF |
| 8 | 2261 |
jr nc, p01loc_6407 |
| 4 | 2262 |
djnz p01loc_63F6 |
| 8 | 2263 |
pop hl |
2264 |
pop de |
|
2265 |
jr finishoutput |
|
| 4 | 2266 |
ret |
| 7 | 2267 |
p01loc_6407: |
| 8 | 2268 |
pop de |
2269 |
pop hl |
|
| 4 | 2270 |
ret |
2271 |
||
|
42
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2272 |
DisplayCalcModelAndOSVersion: |
|
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2273 |
call DisplayCalculatorModel |
|
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2274 |
call PutS_penColPrefixed |
| 11 | 2275 |
ld hl, aOSVersionString |
|
42
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2276 |
PutS_penColPrefixed: |
| 4 | 2277 |
push hl |
2278 |
call ldHLind |
|
| 8 | 2279 |
inc hl |
2280 |
inc hl |
|
2281 |
ld (penCol), hl |
|
2282 |
pop hl |
|
2283 |
inc hl |
|
2284 |
inc hl |
|
2285 |
jp VPutS |
|
| 4 | 2286 |
aHelpEducation_: |
| 8 | 2287 |
.db 0 |
2288 |
.db 3Ah |
|
| 4 | 2289 |
.asc 'Help: education.ti.com',0 |
2290 |
aTi83Plus: |
|
| 8 | 2291 |
.db 1Ah |
2292 |
.db 8 |
|
| 4 | 2293 |
.asc 'TI-83 Plus',0 |
2294 |
aTi83PlusSilver: |
|
| 8 | 2295 |
.db 6 |
2296 |
.db 8 |
|
| 4 | 2297 |
.asc 'TI-83 Plus Silver Edition',0 |
2298 |
aCopyright19982:.asc 'Copyright 1998-2001, Texas Instruments Inc.',0 |
|
2299 |
||
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
2300 |
Page01_3E07: |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2301 |
call j_CursorOff |
| 4 | 2302 |
call ClrLCD |
2303 |
call RunIndicOff |
|
|
42
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2304 |
call DisplayCalculatorModel |
| 4 | 2305 |
call p01sub_65B0 |
| 44 | 2306 |
ld hl, 62h |
| 4 | 2307 |
call p01sub_65B0 |
| 8 | 2308 |
ld hl, aProd |
| 44 | 2309 |
ld a, 7Dh |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2310 |
bit localizeHookActive, (iy+hookflags3) |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2311 |
call nz, j_call_character_hook |
| 4 | 2312 |
call p01sub_65B0 |
| 8 | 2313 |
rst 28h |
2314 |
.dw 80C3h |
|
2315 |
ld a, e |
|
2316 |
ld (OP4), a |
|
2317 |
ld ix, OP4 |
|
2318 |
ld hl, OP1 |
|
2319 |
ld b, 1 |
|
| 4 | 2320 |
call Page0Call_3C4B |
| 44 | 2321 |
ld a, 2Dh |
| 8 | 2322 |
ld (OP1M), a |
2323 |
xor a |
|
2324 |
ld (OP1M+1), a |
|
| 4 | 2325 |
call VPutS |
| 8 | 2326 |
ld de, 80A0h |
| 4 | 2327 |
call p01sub_657F |
| 43 | 2328 |
ld hl, OP1+1 |
| 4 | 2329 |
call VPutS |
| 44 | 2330 |
ld a, 2Dh |
| 8 | 2331 |
ld (OP1), a |
2332 |
xor a |
|
2333 |
ld (OP1+1), a |
|
2334 |
ld hl, OP1 |
|
| 4 | 2335 |
call VPutS |
| 8 | 2336 |
ld de, 8020h |
| 4 | 2337 |
call p01sub_657F |
2338 |
call VPutS |
|
| 44 | 2339 |
ld a, 2Dh |
| 8 | 2340 |
ld (OP1), a |
2341 |
xor a |
|
2342 |
ld (OP1+1), a |
|
2343 |
ld hl, OP1 |
|
| 4 | 2344 |
call VPutS |
| 8 | 2345 |
ld de, 8030h |
| 4 | 2346 |
call p01sub_657F |
2347 |
call VPutS |
|
| 8 | 2348 |
rst 28h |
2349 |
.dw 807Eh |
|
2350 |
jr nz, p01loc_654E |
|
2351 |
ld hl, aId_01 |
|
| 4 | 2352 |
call p01sub_65B0 |
| 8 | 2353 |
ld ix, OP4 |
2354 |
ld hl, OP1 |
|
2355 |
ld d, 1 |
|
| 4 | 2356 |
call Page0Call_3C4B |
2357 |
push hl |
|
| 8 | 2358 |
ld hl, 8482h |
2359 |
ld de, OP2 |
|
2360 |
ld bc, 6 |
|
| 4 | 2361 |
lddr |
| 44 | 2362 |
ld a, 2Dh |
| 29 | 2363 |
ld (OP1+5), a |
| 8 | 2364 |
pop hl |
| 4 | 2365 |
call VPutS |
| 44 | 2366 |
ld a, 2Dh |
| 4 | 2367 |
call VPutMap |
2368 |
call Page0Call_3C51 |
|
| 8 | 2369 |
inc hl |
| 4 | 2370 |
call Page0Call_3C57 |
| 8 | 2371 |
dec hl |
| 4 | 2372 |
call Page0Call_3C57 |
| 7 | 2373 |
p01loc_654E: |
| 8 | 2374 |
ld hl, 2504h |
2375 |
ld (penCol), hl |
|
| 4 | 2376 |
call Page0Call_3C5D |
| 8 | 2377 |
ld hl, 2D00h |
2378 |
ld (penCol), hl |
|
| 4 | 2379 |
call Page0Call_3C63 |
| 8 | 2380 |
jr nz, p01loc_656F |
2381 |
ld a, b |
|
| 44 | 2382 |
cp 31h |
| 8 | 2383 |
jr c, p01loc_6569 |
| 44 | 2384 |
ld b, 30h |
| 7 | 2385 |
p01loc_6569: |
| 8 | 2386 |
ld hl, tempSwapArea |
| 4 | 2387 |
call p01sub_65D6 |
| 7 | 2388 |
p01loc_656F: |
| 8 | 2389 |
ld hl, aHelpEducation_ |
| 44 | 2390 |
ld a, 70h |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2391 |
bit localizeHookActive, (iy+hookflags3) |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2392 |
call nz, j_call_character_hook |
| 4 | 2393 |
call p01sub_65B0 |
2394 |
ret |
|
2395 |
||
| 7 | 2396 |
p01sub_657F: |
| 44 | 2397 |
ld a, 7Ah |
| 8 | 2398 |
ld hl, 4000h |
2399 |
rst 28h |
|
2400 |
.dw 8075h |
|
2401 |
jr nz, p01loc_6593 |
|
| 44 | 2402 |
ld a, 7Ah |
| 8 | 2403 |
inc hl |
2404 |
rst 28h |
|
2405 |
.dw 805Ah |
|
2406 |
ld a, b |
|
2407 |
or c |
|
2408 |
jr nz, p01loc_659A |
|
| 7 | 2409 |
p01loc_6593: |
| 8 | 2410 |
ld (OP4), a |
2411 |
ld c, 1 |
|
2412 |
jr p01loc_65A4 |
|
| 7 | 2413 |
p01loc_659A: |
| 44 | 2414 |
ld a, 7Ah |
| 8 | 2415 |
ld de, OP4 |
| 4 | 2416 |
push bc |
| 8 | 2417 |
rst 28h |
2418 |
.dw 8054h |
|
2419 |
pop bc |
|
| 7 | 2420 |
p01loc_65A4: |
| 8 | 2421 |
ld ix, OP4 |
2422 |
ld hl, OP1 |
|
2423 |
ld b, c |
|
| 4 | 2424 |
call Page0Call_3C4B |
2425 |
ret |
|
2426 |
||
| 7 | 2427 |
p01sub_65B0: |
| 4 | 2428 |
push hl |
2429 |
call ldHLind |
|
| 8 | 2430 |
ld (penCol), hl |
2431 |
pop hl |
|
2432 |
inc hl |
|
2433 |
inc hl |
|
2434 |
jp VPutS |
|
| 4 | 2435 |
|
| 7 | 2436 |
p01loc_65BD: |
| 8 | 2437 |
inc hl |
2438 |
ld a, b |
|
2439 |
or b |
|
2440 |
ret z |
|
2441 |
dec b |
|
| 7 | 2442 |
p01loc_65C2: |
| 8 | 2443 |
ld de, (penCol) |
2444 |
ld e, 0 |
|
2445 |
ld a, 6 |
|
2446 |
add a, d |
|
2447 |
ld d, a |
|
| 44 | 2448 |
cp 37h |
| 8 | 2449 |
ret nc |
2450 |
ld (penCol), de |
|
2451 |
ld a, (hl) |
|
2452 |
jr p01loc_65DF |
|
| 4 | 2453 |
|
| 7 | 2454 |
p01sub_65D6: |
| 8 | 2455 |
ld a, b |
2456 |
or b |
|
2457 |
ret z |
|
2458 |
dec b |
|
2459 |
ld a, (hl) |
|
| 44 | 2460 |
cp 0D6h |
| 8 | 2461 |
jr z, p01loc_65BD |
| 7 | 2462 |
p01loc_65DF: |
| 4 | 2463 |
call VPutMap |
| 8 | 2464 |
jr c, p01loc_65C2 |
2465 |
inc hl |
|
2466 |
jr p01sub_65D6 |
|
| 4 | 2467 |
|
| 8 | 2468 |
aProd: .db 4 |
2469 |
.db 16h |
|
| 4 | 2470 |
.asc 'PROD #: ',0 |
| 8 | 2471 |
aId_01: .db 4 |
2472 |
.db 1Eh |
|
| 4 | 2473 |
.asc 'ID: ',0 |
2474 |
||
|
17
41d98670c2d3
Fix the page 0 labels to have the proper address in their name.
brandonlw
parents:
16
diff
changeset
|
2475 |
Page01_3FA5: |
| 4 | 2476 |
di |
| 44 | 2477 |
ld a, 2Bh |
| 4 | 2478 |
call lcd_busy |
| 8 | 2479 |
out (10h), a |
2480 |
ld (hl), 14h |
|
2481 |
ld hl, indicBusy |
|
| 44 | 2482 |
rrc (hl) |
| 8 | 2483 |
ld c, (hl) |
2484 |
ld b, 8 |
|
| 44 | 2485 |
ld d, 80h |
| 7 | 2486 |
p01loc_660F: |
| 8 | 2487 |
ld a, d |
| 4 | 2488 |
call p01sub_55E5 |
2489 |
call SetXUp |
|
2490 |
call lcd_busy |
|
| 8 | 2491 |
in a, (11h) |
| 4 | 2492 |
call lcd_busy |
| 8 | 2493 |
in a, (11h) |
2494 |
ld e, a |
|
2495 |
ld a, d |
|
| 4 | 2496 |
call p01sub_55E5 |
2497 |
call SetXUp |
|
| 8 | 2498 |
ld a, e |
| 4 | 2499 |
rr c |
| 8 | 2500 |
jr c, p01loc_6631 |
2501 |
res 0, a |
|
2502 |
jr p01loc_6633 |
|
| 7 | 2503 |
p01loc_6631: |
| 8 | 2504 |
set 0, a |
| 7 | 2505 |
p01loc_6633: |
| 4 | 2506 |
call lcd_busy |
| 8 | 2507 |
out (11h), a |
2508 |
inc d |
|
| 4 | 2509 |
djnz p01loc_660F |
2510 |
ret |
|
2511 |
||
2512 |
JForceGraphNoKey: |
|
| 44 | 2513 |
ld a, kGraph |
| 4 | 2514 |
JForceGraphKey: |
| 8 | 2515 |
ld b, a |
2516 |
ld sp, (onSP) |
|
| 38 | 2517 |
res cmdExec, (iy+cmdFlags) |
| 44 | 2518 |
ld a, kGraph |
| 4 | 2519 |
call newContext0 |
| 8 | 2520 |
jp sendKPress |
| 4 | 2521 |
|
|
42
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2522 |
DisplayCalculatorModel: |
| 8 | 2523 |
ld hl, aTi83Plus |
|
42
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2524 |
ld a, 65h |
| 4 | 2525 |
call NZIf83Plus |
| 8 | 2526 |
jr nz, p01loc_665E |
2527 |
ld hl, aTi83PlusSilver |
|
|
42
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2528 |
ld a, 7Ch |
| 4 | 2529 |
p01loc_665E: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2530 |
bit localizeHookActive, (iy+hookflags3) |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2531 |
call nz, j_call_character_hook |
| 4 | 2532 |
ret |
|
42
adad2f097dcb
Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents:
38
diff
changeset
|
2533 |
|
| 4 | 2534 |
KeyToString: |
| 8 | 2535 |
ld a, d |
2536 |
cp 0FFh |
|
2537 |
jr z, p01loc_667C |
|
| 44 | 2538 |
cp 0FBh |
| 8 | 2539 |
jr z, p01loc_6673 |
| 44 | 2540 |
cp 0FCh |
| 8 | 2541 |
jr nz, p01loc_667A |
| 7 | 2542 |
p01loc_6673: |
| 8 | 2543 |
ld h, 2 |
| 4 | 2544 |
call Page0Call_3BB5 |
| 8 | 2545 |
jr p01loc_6691 |
| 7 | 2546 |
p01loc_667A: |
| 44 | 2547 |
cp 0FEh |
| 7 | 2548 |
p01loc_667C: |
| 8 | 2549 |
ld a, e |
2550 |
jr z, p01loc_668C |
|
| 44 | 2551 |
cp 5Ah |
| 8 | 2552 |
jr c, p01loc_6697 |
| 4 | 2553 |
call p01sub_6720 |
| 8 | 2554 |
ret z |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2555 |
call j_ConvKeyToTok |
| 8 | 2556 |
jr p01loc_6691 |
| 7 | 2557 |
p01loc_668C: |
| 8 | 2558 |
ld h, 1 |
| 4 | 2559 |
call Page0Call_3BB5 |
| 7 | 2560 |
p01loc_6691: |
| 4 | 2561 |
call GETTOKSTRING |
| 8 | 2562 |
jp p01loc_670D |
| 7 | 2563 |
p01loc_6697: |
| 8 | 2564 |
cp 1Fh |
2565 |
jr z, p01loc_66D6 |
|
| 44 | 2566 |
cp 40h |
| 8 | 2567 |
jr c, p01loc_66EA |
| 44 | 2568 |
cp 59h |
| 8 | 2569 |
jp z, p01loc_66BC |
| 44 | 2570 |
cp 40h |
| 8 | 2571 |
jr nz, p01loc_66CA |
2572 |
ld a, d |
|
2573 |
cp 10h |
|
2574 |
ld a, e |
|
2575 |
jr nz, p01loc_66CA |
|
2576 |
ld hl, Condition8Table |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2577 |
bit localizeHookActive, (iy+hookflags3) |
| 8 | 2578 |
ld a, 8 |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2579 |
call nz, j_call_character_hook |
| 8 | 2580 |
jr p01loc_670D |
| 7 | 2581 |
p01loc_66BC: |
| 8 | 2582 |
ld a, d |
2583 |
cp 0 |
|
2584 |
jr c, p01loc_66C5 |
|
| 44 | 2585 |
ld a, 61h |
| 8 | 2586 |
jr p01loc_66D8 |
| 7 | 2587 |
p01loc_66C5: |
| 44 | 2588 |
ld a, 40h |
| 8 | 2589 |
ld (kbdKey), a |
| 7 | 2590 |
p01loc_66CA: |
| 44 | 2591 |
cp 55h |
| 8 | 2592 |
jr z, p01loc_66E7 |
| 44 | 2593 |
cp 4Ch |
| 8 | 2594 |
jr nz, p01loc_66DB |
| 44 | 2595 |
ld a, 5Fh |
| 8 | 2596 |
jr p01loc_66D8 |
| 7 | 2597 |
p01loc_66D6: |
| 44 | 2598 |
ld a, 50h |
| 7 | 2599 |
p01loc_66D8: |
| 8 | 2600 |
add a, d |
2601 |
jr p01loc_66EC |
|
| 7 | 2602 |
p01loc_66DB: |
| 44 | 2603 |
cp 56h |
| 8 | 2604 |
jr z, p01loc_66E3 |
| 44 | 2605 |
cp 42h |
| 8 | 2606 |
jr nz, p01loc_66E8 |
| 7 | 2607 |
p01loc_66E3: |
| 8 | 2608 |
add a, 9 |
2609 |
add a, 0Dh |
|
| 7 | 2610 |
p01loc_66E7: |
| 8 | 2611 |
add a, d |
| 7 | 2612 |
p01loc_66E8: |
| 8 | 2613 |
sub 1Bh |
| 7 | 2614 |
p01loc_66EA: |
| 8 | 2615 |
sub 10h |
| 7 | 2616 |
p01loc_66EC: |
| 44 | 2617 |
cp 63h |
| 8 | 2618 |
jr c, p01loc_66F2 |
2619 |
ld a, 13h |
|
| 7 | 2620 |
p01loc_66F2: |
| 8 | 2621 |
ld l, a |
2622 |
ld h, 0 |
|
2623 |
add hl, hl |
|
2624 |
ld de, MenuItems2Table |
|
2625 |
add hl, de |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2626 |
bit localizeHookActive, (iy+hookflags3) |
| 8 | 2627 |
jr z, p01loc_6708 |
2628 |
ld e, a |
|
2629 |
ld a, 9 |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2630 |
call j_call_character_hook |
| 8 | 2631 |
jr z, p01loc_670D |
| 7 | 2632 |
p01loc_6708: |
| 8 | 2633 |
ld e, (hl) |
2634 |
inc hl |
|
2635 |
ld d, (hl) |
|
2636 |
ex de, hl |
|
2637 |
cp a |
|
| 7 | 2638 |
p01loc_670D: |
| 4 | 2639 |
push af |
2640 |
push bc |
|
2641 |
push de |
|
| 8 | 2642 |
dec hl |
2643 |
ld de, keyForStr |
|
2644 |
ld bc, 12h |
|
| 4 | 2645 |
ldir |
| 8 | 2646 |
pop de |
2647 |
pop bc |
|
2648 |
pop af |
|
2649 |
ld hl, keyToStrRam |
|
| 4 | 2650 |
ret |
2651 |
||
2652 |
p01sub_6720: |
|
| 8 | 2653 |
ld hl, MenuFunctionStringTable |
2654 |
ld b, 13 |
|
2655 |
jr p01loc_6727 |
|
| 4 | 2656 |
p01loc_6727: |
| 8 | 2657 |
cp (hl) |
2658 |
jr z, p01loc_6730 |
|
2659 |
inc hl |
|
2660 |
inc hl |
|
2661 |
inc hl |
|
| 4 | 2662 |
djnz p01loc_6727 |
2663 |
ret |
|
2664 |
p01loc_6730: |
|
| 8 | 2665 |
inc hl |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
17
diff
changeset
|
2666 |
bit localizeHookActive, (iy+hookflags3) |
| 8 | 2667 |
jr z, p01loc_6708 |
2668 |
ld e, a |
|
2669 |
ld a, 0Ah |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
11
diff
changeset
|
2670 |
call j_call_character_hook |
| 8 | 2671 |
jr p01loc_670D |
2672 |
jr p01loc_6708 |