Prev: 34378 Up: Map Next: 34459
34426: 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 34426 PUSH AF Save AF, BC, DE and HL, subtract 32, and multiply the offset by eight.
34427 PUSH BC
34428 PUSH DE
34429 PUSH HL
34430 SUB 32
34432 LD L,A
34433 LD H,0
34435 ADD HL,HL
34436 ADD HL,HL
34437 ADD HL,HL
34438 LD DE,15616 Calculate font graphic data address using CHARSET + offset.
34441 ADD HL,DE
34442 EX DE,HL Store the result in DE, restore the screen location to HL.
34443 POP HL
34444 PUSH HL
34445 LD B,8 Set a counter for 8 lines.
Print_RomFont_Loop 34447 LD A,(DE) Fetch the font byte and copy it to the screen.
34448 LD (HL),A
34449 INC DE Move onto the next font data byte.
34450 INC H Move the screen pointer down one row.
34451 DJNZ Print_RomFont_Loop Decrease counter by one and loop back to Print_RomFont_Loop until counter is zero.
34453 POP HL Move the screen pointer across one column, ready for printing the next character.
34454 POP DE
34455 POP BC
34456 POP AF
34457 INC L
34458 RET Return.
Prev: 34378 Up: Map Next: 34459