Back to Skool Routines
27419: Prepare one line of message in buffer
Used by the routines at 20665 and 27462.
DE Message address
HL Start address of buffer
27419 LD (54795),DE Save the message address in bytes 11 and 12 of the character buffer in page 214
27423 PUSH HL Copy the start address of the buffer to HL'
27424 EXX
27425 POP HL
27426 LD BC,16384 B=64, C=0 (during startup this is LD BC,0; see 21408)
27429 LD (HL),C Create 64 (or 256) empty pixel columns in the buffer
27430 INC HL
27431 DJNZ 27429
27433 DEC HL HL'=address of last byte in buffer
27434 EXX
27435 LD H,214 We are using the character buffer in page 214 to process the message
27437 LD C,64 The message box is 64 pixels wide (during startup this is LD C,255; see 21408)
27439 CALL 26318 Get character code from message into A
27442 CP 3 Is the character code 0, 1 or 2?
27444 JR C,27451 Jump if so to centre the text
27446 CALL 27110 Slide the bitmap for CHR$(A) into the buffer
27449 JR 27439 Jump back to do the next character
27451 SRL C Now C=half the number of pixel columns left in the buffer
27453 RET Z Return if this is zero (the buffer is full)
27454 CALL 27124 Create C empty pixel columns in the buffer, thus centring the message
27457 DEC C
27458 JR NZ,27454
27460 RET