![]() |
Routines |
| Prev: CB09 | Up: Map | Next: CB3E |
|
Used by the routine at PRINT_CHAR_COLOURED.
Copies the character's eight bytes, from FONT_BASE plus eight times the code, onto the eight pixel rows of the cell, and gives HL back as it was. A space is printed as code $3C, a blank character in the font; the icons come in at PRINT_CODE, where a code of $20 is a character like any other. Alien 8's PRINT_CHAR drew into a buffer and moved HL on; this one draws on the screen and does not.
|
||||||||||
| PRINT_CHAR | CB19 | CP $20 | a space is $3C, blank in the font | |||||||
| CB1B | JR NZ,PRINT_CODE | |||||||||
| CB1D | LD A,$3C | |||||||||
|
This entry point is used by the routine at PICK_UP_THING.
|
||||||||||
| PRINT_CODE | CB1F | PUSH BC | DE = FONT_BASE + 8 * the code | |||||||
| CB20 | PUSH DE | |||||||||
| CB21 | PUSH HL | |||||||||
| CB22 | LD L,A | |||||||||
| CB23 | LD H,$00 | |||||||||
| CB25 | ADD HL,HL | |||||||||
| CB26 | ADD HL,HL | |||||||||
| CB27 | ADD HL,HL | |||||||||
| CB28 | LD DE,(FONT_BASE) | |||||||||
| CB2C | ADD HL,DE | |||||||||
| CB2D | EX DE,HL | |||||||||
| CB2E | POP HL | eight rows, each 256 bytes on in the screen's layout | ||||||||
| CB2F | LD B,$08 | |||||||||
| PRINT_CHAR_0 | CB31 | LD A,(DE) | ||||||||
| CB32 | INC DE | |||||||||
| CB33 | LD (HL),A | |||||||||
| CB34 | INC H | |||||||||
| CB35 | DJNZ PRINT_CHAR_0 | |||||||||
| CB37 | POP DE | back up to the top row | ||||||||
| CB38 | POP BC | |||||||||
| CB39 | LD A,H | |||||||||
| CB3A | SUB $08 | |||||||||
| CB3C | LD H,A | |||||||||
| CB3D | RET | |||||||||
| Prev: CB09 | Up: Map | Next: CB3E |