Prev: 864A Up: Map Next: 869B
867A: Print: ROM Font
Used by the routines at Print_Character and Print_ScrollTheLineBuffer.
Draws one character with the Spectrum ROM font.
Input
A ASCII value of character to print
Prints using the standard ZX Spectrum CHARSET.
Print_RomFont 867A PUSH AF Save AF, BC, DE and HL, subtract 20, and multiply the offset by eight.
867B PUSH BC
867C PUSH DE
867D PUSH HL
867E SUB $20
8680 LD L,A
8681 LD H,$00
8683 ADD HL,HL
8684 ADD HL,HL
8685 ADD HL,HL
8686 LD DE,$3D00 Calculate font graphic data address using CHARSET + offset.
8689 ADD HL,DE
868A EX DE,HL Store the result in DE, restore the screen location to HL.
868B POP HL
868C PUSH HL
868D LD B,$08 Set a counter for 08 lines.
Print_RomFont_Loop 868F LD A,(DE) Fetch the font byte and copy it to the screen.
8690 LD (HL),A
8691 INC DE Move onto the next font data byte.
8692 INC H Move the screen pointer down one row.
8693 DJNZ Print_RomFont_Loop Decrease counter by one and loop back to Print_RomFont_Loop until counter is zero.
8695 POP HL Move the screen pointer across one column, ready for printing the next character.
8696 POP DE
8697 POP BC
8698 POP AF
8699 INC L
869A RET Return.
Prev: 864A Up: Map Next: 869B