Prev: 25369 Up: Map Next: 25556
25492: 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 25492 CP 32 Jump to PrintCharacter_Other if this is not a space.
25494 JR NZ,PrintCharacter_Other
25496 PUSH AF Stash the space on the stack.
25497 JR PrintCharacter_Rub Jump to PrintCharacter_Rub.
Any other character, or a space that is not doubled.
PrintCharacter_Other 25499 PUSH AF Stash the character on the stack.
25500 LD A,(23434) Jump to PrintCharacter_Keep if *PrintColumn is not 1.
25503 CP 1
25505 JR NZ,PrintCharacter_Keep
Rub out a previous space.
PrintCharacter_Rub 25507 LD A,(23452) Jump to PrintCharacter_Keep if *PreviousGlyph is not a space.
25510 CP 32
25512 JR NZ,PrintCharacter_Keep
25514 LD A,12 Rub it out.
25516 CALL PlotCharacter
Plot this character.
PrintCharacter_Keep 25519 POP AF Write it to *PreviousGlyph.
25520 LD (23452),A
25523 PUSH AF Stash the registers around the plot.
25524 PUSH HL
25525 PUSH BC
25526 PUSH DE
25527 CP 13 Jump to PrintCharacter_Plot if this is not ENTER.
25529 JR NZ,PrintCharacter_Plot
25531 LD A,(23434) Copy *PrintColumn into B.
25534 LD B,A
Pad the row to the margin.
PrintCharacter_Pad 25535 INC B One more column.
25536 LD A,43 Stop at column 42.
25538 CP B
25539 JR Z,PrintCharacter_Done
25541 LD A,32 Print a pad space.
25543 CALL PlotCharacter
25546 JR PrintCharacter_Pad Jump to PrintCharacter_Pad.
Plot any other character.
PrintCharacter_Plot 25548 CALL PlotCharacter Call PlotCharacter.
This entry point is used by the routines at CollectWord, PrintObjectName and PrintNumberedMessage.
Restore the registers.
PrintCharacter_Done 25551 POP DE Restore the registers from the stack.
25552 POP BC
25553 POP HL
25554 POP AF
25555 RET Return.
Prev: 25369 Up: Map Next: 25556