| Routines

27110: Place a font character bitmap into a message graphic buffer

Used by the routines at 27419 and 27144. Appends a font character bitmap (corresponding to the ASCII code in A) to the existing contents of a message graphic buffer.
Input
A | ASCII code
C | Pixel columns remaining in the buffer
HL' | Buffer address
27110 | LD E,A | E=ASCII code (32-127)
27111 | LD D,215 | Point DE at the appropriate entry in the table of font character bitmap widths at 55072
27113 | LD A,(DE) | A=width of the font character in pixels (1-5)
27114 | LD B,A | Store this in B
27115 | INC D |
27116 | LD A,(DE) | A=bit pattern for one pixel column of the font character
27117 | CALL 27125 | Slide this into the message buffer
27120 | DEC C | One fewer pixel column remaining in the message buffer
27121 | DJNZ 27115 | Jump back until all pixel columns for the font character have been copied into the message buffer
27123 | DEC C | One fewer pixel column remaining in the message buffer
This entry point is used by the routine at 27419.
27124 | XOR A | A=0 (blank pixel column)
27125 | EXX |
27126 | PUSH HL |
27127 | LD C,8 | 8 pixels per column
27129 | LD B,32 | 32 (during startup) or 8 bytes per pixel row (this instruction is set to LD B,8 before the game starts; see 21408)
27131 | RRCA | Push a pixel into the carry flag
27132 | RL (HL) | Drag the pixel into the message buffer and shove the existing pixels one place to the left
27134 | DEC HL
27135 | DJNZ 27132
27137 | DEC C |
27138 | JR NZ,27129 | Jump back to collect the next pixel up
27140 | POP HL | Restore the address of the last byte in the message buffer to HL'
27141 | EXX |
27142 | RET |