Prev: 6319 Up: Map Next: 63D4
6394: Print Character
Used by the routines at DescribeLocation, CollectWord, ListCarried and PrintFlag.
Plots A. A space that would sit on top of another space is rubbed out first. ENTER pads the row out to the margin.
PrintCharacter 6394 CP $20 A space may need to rub out a previous space.
6396 JR NZ,PrintCharacter_Other
6398 PUSH AF
6399 JR PrintCharacter_Rub
PrintCharacter_Other 639B PUSH AF Only column 1 can be a doubled space.
639C LD A,($5B8A)
639F CP $01
63A1 JR NZ,PrintCharacter_Keep
PrintCharacter_Rub 63A3 LD A,($5B9C) The previous glyph is a space.
63A6 CP $20
63A8 JR NZ,PrintCharacter_Keep
63AA LD A,$0C Rub it out.
63AC CALL PlotCharacter
PrintCharacter_Keep 63AF POP AF Remember this glyph.
63B0 LD ($5B9C),A
63B3 PUSH AF Save the registers around the plot.
63B4 PUSH HL
63B5 PUSH BC
63B6 PUSH DE
63B7 CP $0D ENTER pads the line out to column 2A.
63B9 JR NZ,PrintCharacter_Plot
63BB LD A,($5B8A)
63BE LD B,A
PrintCharacter_Pad 63BF INC B One more column.
63C0 LD A,$2B Stop at column 2A.
63C2 CP B
63C3 JR Z,PrintCharacter_Done
63C5 LD A,$20 Print a pad space and continue.
63C7 CALL PlotCharacter
63CA JR PrintCharacter_Pad
PrintCharacter_Plot 63CC CALL PlotCharacter Call PlotCharacter to plot any other character.
This entry point is used by the routines at CollectWord, PrintObjectName and PrintNumberedMessage.
PrintCharacter_Done 63CF POP DE Restore the registers from the stack.
63D0 POP BC
63D1 POP HL
63D2 POP AF
63D3 RET Return.
Prev: 6319 Up: Map Next: 63D4