← 98C0 Move a screen address down one pixel line Map 98F7 → Advance a buffer pointer down one 32-column row
98E0: Draw one glyph to a display-file cell and color it
Blits one 8-row glyph bitmap into a display-file character cell and sets that cell's attribute.
It takes the glyph pointer directly, so this routine does no character-code lookup.
Input
HL display-file address of the cell's top pixel row
DE source of the 8 glyph bitmap bytes, one per pixel row, top first
C attribute byte to write for the cell
Output
DE address after the glyph bitmap
draw_glyph 98E0 PUSH HL Hold the cell address for the attribute write below.
98E1 LD B,$08 Walk the cell's pixel rows.
draw_glyph_0 98E3 LD A,(DE) Copy one glyph byte and step down one pixel row. INC H walks the display file down a pixel row; this stays valid only within a single cell, which is exactly the 8 rows here.
98E4 LD (HL),A
98E5 INC H
98E6 INC DE
98E7 DJNZ draw_glyph_0
98E9 POP HL
98EA PUSH HL
98EB LD A,H Move H from the display file to the attribute file. The screen third in H picks the attribute page.
98EC AND $18
98EE RRCA
98EF RRCA
98F0 RRCA
98F1 ADD A,$58
98F3 LD H,A
98F4 LD (HL),C Set the cell's attribute to C.
98F5 POP HL
98F6 RET
← 98C0 Move a screen address down one pixel line Map 98F7 → Advance a buffer pointer down one 32-column row
Fork me on GitHub