Prev: 42436 Up: Map Next: 42554
42445: Process Text Command
Used by the routines at ProcessTextStream and 42707.
Input
IX Pointer to text data
ProcessTextCommand 42445 LD A,(IX+0) A=*IX+0.
42448 BIT 7,A Jump to ProcessTextCommand_2 if bit 7 of A is not set.
42450 JR Z,ProcessTextCommand_2
42452 AND %01111111 Keep only bits 0-6.
42454 LD D,A D=A.
42455 LD E,(IX+1) E=*IX+1.
42458 INC IX Increment IX by one.
42460 AND %11110000 Keep only bits 4-7.
42462 CP 48 Jump to 42567 if A is equal to 48.
42464 JR Z,42567
42466 CP 32 Jump to 42567 if A is equal to 32.
42468 JR Z,42567
42470 CP 96 Jump to 42567 if A is equal to 96.
42472 JR Z,42567
This entry point is used by the routine at 43066.
ProcessTextCommand_0 42474 CALL 43143 Call 43143.
ProcessTextCommand_1 42477 INC IX Increment IX by one.
42479 OR %00000001 Set bit 0 to indicate there is further text to print.
42481 RET Return.
ProcessTextCommand_2 42482 CP 32 Jump to ProcessTextCommand_5 if A is less than 32.
42484 JR C,ProcessTextCommand_5
42486 CP 96 Jump to 43066 if A is greater than 96.
42488 JP NC,43066
42491 CP 64 Jump to ProcessTextCommand_4 if A is less than 64.
42493 JR C,ProcessTextCommand_4
42495 AND %00011111 Keep only bits 0-4.
42497 INC A Increment A by one.
42498 LD B,A B=A.
42499 PUSH IX HL=IX (using the stack).
42501 POP HL
42502 INC HL Increment HL by one.
42503 LD C,0 C=0.
ProcessTextCommand_3 42505 CALL 43408 Call 43408.
42508 CALL 43447 Call 43447.
42511 DJNZ ProcessTextCommand_3 Decrease counter by one and loop back to ProcessTextCommand_3 until counter is zero.
42513 PUSH HL IX=HL (using the stack).
42514 POP IX
42516 LD A,C A=C.
42517 AND A Set flags.
42518 JR NZ,ProcessTextCommand_1 Jump to ProcessTextCommand_1 if HL is not equal to A.
42520 DEC IX Decrease IX by one.
42522 JR ProcessTextCommand_1 Jump to ProcessTextCommand_1.
ProcessTextCommand_4 42524 CALL 43447 Call 43447.
42527 JR ProcessTextCommand_1 Jump to ProcessTextCommand_1.
ProcessTextCommand_5 42529 PUSH DE Stash DE on the stack.
42530 LD E,A E=A.
42531 LD D,0 D=0.
42533 LD HL,42333 HL=42333+(DE*2).
42536 ADD HL,DE
42537 ADD HL,DE
42538 LD E,(HL) E=*HL.
42539 INC HL Increment HL by one.
42540 LD D,(HL) D=*HL.
42541 EX DE,HL Exchange the DE and HL registers.
42542 POP DE Restore DE from the stack.
42543 CP 29 Jump to IndirectJump if A is greater than or equal to 29.
42545 JR NC,IndirectJump
42547 CALL IndirectJump Call IndirectJump.
42550 JR Z,ProcessTextCommand_1 Jump to ProcessTextCommand_1 if A is equal to 29.
42552 JR ProcessTextCommand_0 Jump to ProcessTextCommand_0.
Prev: 42436 Up: Map Next: 42554