Routines

27110: Place character graphic in message buffer


Used by routines at 27419 and 27144

A Character code
C Vertical pixel lines remaining in buffer
HL' Address of last byte in message buffer

27110 5F LD E,A E=character code
27111 16D7 LD D,215 DE=anything from 55072 to 55167
27113 1A LD A,(DE) A=bit width of character (1-5)
27114 47 LD B,A
27115 14 INC D
27116 1A LD A,(DE) A=bit pattern for one vertical pixel line
27117 CDF569 CALL 27125
27120 0D DEC C One more vertical pixel line done
27121 10F8 DJNZ 27115 Next vertical pixel line
27123 0D DEC C One more vertical pixel line done
27124 AF XOR A A=blank vertical pixel line
27125 D9 EXX
27126 E5 PUSH HL
27127 0E08 LD C,8 8 pixels per vertical line

During startup:
27129 0620 LD B,32 32 bytes per horizontal pixel line

During the game (after the POKEs made by the startup routine at 21408):
27129 0608 LD B,8 8 bytes per horizontal pixel line

The routine continues:
27131 0F RRCA Push a vertical pixel into the carry flag
27132 CB16 RL (HL) Drag the pixel into the message buffer and shove the existing pixels one place to the left
27134 2B DEC HL
27135 10FB DJNZ 27132
27137 0D DEC C
27138 20F5 JR NZ,27129 Jump back to collect next vertical pixel up
27140 E1 POP HL
27141 D9 EXX
27142 C9 RET