Prev: E2B0 Up: Map Next: E2FA
E2D0: Set up message text on scroll to print
Used by the routines at C03F, C763, DA88 and E4E7.
Set up the message data, pointers and next character to print, in preparation before the print routine at E2FA.
E2D0 LD DE,($EAA1) Get address of message text to print
E2D4 LD A,(DE) Get the number of letters/characters in the message
E2D5 LD ($EAA3),A ...and store
E2D8 LD ($EAA4),HL Store the screen display address pointer
E2DB INC DE Point at the first letter/character to print
E2DC LD ($EAA1),DE ...and store address pointer
This entry point is used by the routines at DD5C, DF33, E2FA, E6FA and E7C2.
E2E0 LD DE,($EAA1) Get the message text address pointer
E2E4 LD A,(DE) Get the letter/character to print
E2E5 INC DE Move the pointer on to the next one
E2E6 LD ($EAA1),DE ...and store
E2EA CP $1B Is the character a line break (code 27)?
E2EC JR NZ,$E2FA If not, continue to print text
End of line character (27) encountered. Move down one character row and to the left hand position of the scroll. New screen display address calculated and stored.
As all printing is done in the bottom third of the screen, only the low byte of the screen display address needs changing.
E2EE LD A,($EAA4) Get the current screen display address low byte
E2F1 AND $E0 Reset the column number to 0
E2F3 ADD A,$28 ...and add 40, thus moving down one row (32 characters) and right 8 characters, to the left hand side of the scroll, on the next row down
E2F5 LD ($EAA4),A Store the screen display address low byte
E2F8 JR $E32C ...and jump straight into the text print routine.
Prev: E2B0 Up: Map Next: E2FA