Prev: 38774 Up: Map Next: 38869
38795: Handler: ASCII Character
Used by the routine at Controller_CharacterPrinting.
Handler_ASCIICharacter 38795 PUSH BC Stash BC and DE on the stack.
38796 PUSH DE
38797 SUB 32 A-=32.
38799 LD L,A Create an offset in HL.
38800 LD H,0
38802 ADD HL,HL HL*=8.
38803 ADD HL,HL
38804 ADD HL,HL
38805 LD DE,(63514) HL+=*Font_Pointer.
38809 ADD HL,DE
38810 PUSH HL Stash HL on the stack.
38811 LD A,(63513) Multiply *63513 by 2 and store the result in A.
38814 ADD A,A
38815 LD HL,39365 HL=39365.
38818 ADD A,L L+=A.
38819 LD L,A
38820 JR NC,ASCIICharacter_NoCarry Jump to ASCIICharacter_NoCarry if there's no carry.
38822 INC H Handle carry.
ASCIICharacter_NoCarry 38823 LD E,(HL) E=*HL.
38824 INC HL Increment HL by one.
38825 LD D,(HL) D=*HL.
38826 LD A,(63512) A=*63512.
38829 EX DE,HL Exchange the DE and HL registers.
38830 ADD A,L A+=L.
38831 LD L,A L=A.
38832 PUSH HL DE=HL (using the stack).
38833 POP DE
38834 POP HL Restore HL from the stack.
38835 PUSH DE Stash DE on the stack.
38836 LD B,8 B=8.
Handler_ASCIICharacter_0 38838 LD A,(HL) Write *HL to *DE.
38839 LD (DE),A
38840 INC D Increment D by one.
38841 INC HL Increment HL by one.
38842 DJNZ Handler_ASCIICharacter_0 Decrease counter by one and loop back to Handler_ASCIICharacter_0 until counter is zero.
38844 POP HL Restore HL from the stack.
38845 LD A,H A=H.
38846 RRA RRA.
38847 RRA
38848 RRA
38849 AND %00000011 Keep only bits 0-1.
38851 ADD A,(IY+29) A+=*IY+29.
38854 LD H,A H=A.
38855 LD A,(63518) A=*Print_AttributeVariable.
38858 LD (HL),A Write A to *HL.
38859 INC L Increment L by one.
38860 LD (HL),A Write A to *HL.
38861 POP DE Restore DE and BC from the stack.
38862 POP BC
38863 LD HL,63512 HL=63512.
38866 JP 38936 Jump to 38936.
Prev: 38774 Up: Map Next: 38869