| Routines

27462: Print a message box

Used by the routines at 29716 and 32433. Prepares the text of a message in the graphic buffer at 58408 and then copies the buffer to the screen.
Input
A | Message number
C | Message box attribute byte
DE | Attribute file address at which to print the message box
27462 | LD HL,58408 | The graphic data for the message box will be stored in the buffer at 58408 before being copied to the screen
27465 | LD B,24 | 24=3 rows of 8 character squares
27467 | LD (HL),C | Prepare the attribute bytes in the buffer
27468 | INC L
27469 | DJNZ 27467
27471 | PUSH DE | Save the attribute file address temporarily
27472 | LD L,A | Set DE to the start address of the message
27473 | LD H,254
27475 | LD E,(HL)
27476 | INC H
27477 | LD D,(HL)
27478 | LD HL,58456 | Point HL at the address in the buffer corresponding to the start of the fourth row of pixels from the top of the message box (the first three rows are always empty)
27481 | CALL 27419 | Prepare the first line of text in the buffer
27484 | LD HL,58520 | Point HL at the address in the buffer corresponding to the start of the 12th row of pixels from the top
27487 | CALL 27423 | Prepare the second line of text in the buffer
27490 | POP DE | Retrieve the attribute file address for the message box
27491 | LD HL,58408 | Point to the start of the buffer
27494 | JP 27364 | Transfer the buffer to the screen