Prev: 38710 Up: Map Next: 38774
38740: Controller: Character Printing
Used by the routine at PrintCharacter.
Controller_CharacterPrinting 38740 POP AF A=the character to print (from the stack).
38741 PUSH AF Keep a copy of the character to print on the stack.
38742 CP 32 Jump to Handler_ASCIICharacter if the character is a "normal" ASCII character (32 or higher).
38744 JP NC,Handler_ASCIICharacter
Else this is a control character.
38747 LD (63508),A Write the control code to *Buffer_ControlCode.
38750 LD HL,39269 HL=Table_ControlCodes.
38753 ADD A,L Add A to L.
38754 LD L,A
38755 JR NC,CharacterPrinting_NoCarry Jump to CharacterPrinting_NoCarry if there's no carry.
38757 INC H Handle the carry.
CharacterPrinting_NoCarry 38758 LD A,(HL) Write *HL to *Buffer_Counter.
38759 LD (63509),A
38762 AND A Jump to Handler_ControlCode if A is zero.
38763 JR Z,Handler_ControlCode
Reset the buffer pointer.
38765 LD HL,63500 Write PrintVariable_01 to *Buffer_Pointer.
38768 LD (63498),HL
38771 POP AF Restore AF and HL from the stack.
38772 POP HL
38773 RET Return.
Prev: 38710 Up: Map Next: 38774