Prev: CB15 Up: Map Next: CB63
CB35: Print a character in a message
Input
IX Pointer to the text buffer
A Character to print
CB35 PUSH IX Remember IX
CB37 LD L,A Put the character in HL.
CB38 LD H,$00
CB3A ADD HL,HL Multiply by 8 to get a correct offset.
CB3B ADD HL,HL
CB3C ADD HL,HL
CB3D LD DE,$813B Add basic offset to character set.
CB40 ADD HL,DE
CB41 PUSH HL Put the address of the graphic in IX.
CB42 POP IX
CB44 LD HL,$50C0 Point HL at the bottom of the screen.
CB47 LD DE,($CB91) Put the column in DE.
CB4B LD D,$00
CB4D ADD HL,DE Add this as an offset to get the actual screen address.
CB4E LD B,$08 8 rows to copy.
CB50 LD A,(IX+$00) Get the graphic data.
CB53 LD (HL),A Copy it to screen.
CB54 INC H Move forward a row.
CB55 INC IX Move forward in the data.
CB57 DJNZ $CB50 Loop back if there is more to do.
CB59 POP IX Restore IX.
CB5B LD A,($CB91) Move to the next column.
CB5E INC A
CB5F LD ($CB91),A
CB62 RET
Prev: CB15 Up: Map Next: CB63