Routines |
Prev: 9736 | Up: Map | Next: 9776 |
Used by the routine at PrintCharacter.
|
||||
Controller_CharacterPrinting | 9754 | POP AF | A=the character to print (from the stack). | |
9755 | PUSH AF | Keep a copy of the character to print on the stack. | ||
9756 | CP $20 | Jump to Handler_ASCIICharacter if the character is a "normal" ASCII character (20 or higher). | ||
9758 | JP NC,Handler_ASCIICharacter | |||
Else this is a control character.
|
||||
975B | LD ($F814),A | Write the control code to *Buffer_ControlCode. | ||
975E | LD HL,$9965 | HL=Table_ControlCodes. | ||
9761 | ADD A,L | Add A to L. | ||
9762 | LD L,A | |||
9763 | JR NC,CharacterPrinting_NoCarry | Jump to CharacterPrinting_NoCarry if there's no carry. | ||
9765 | INC H | Handle the carry. | ||
CharacterPrinting_NoCarry | 9766 | LD A,(HL) | Write *HL to *Buffer_Counter. | |
9767 | LD ($F815),A | |||
976A | AND A | Jump to Handler_ControlCode if A is zero. | ||
976B | JR Z,Handler_ControlCode | |||
Reset the buffer pointer.
|
||||
976D | LD HL,$F80C | Write F80C to *Buffer_Pointer. | ||
9770 | LD ($F80A),HL | |||
9773 | POP AF | Restore AF and HL from the stack. | ||
9774 | POP HL | |||
9775 | RET | Return. |
Prev: 9736 | Up: Map | Next: 9776 |