Routines |
Prev: E6BC | Up: Map | Next: E72F |
Used by the routines at InitialiseGame, AllTreasureCollected, PrintStatusBarIcons, PrintStatusBar, Handler_Items, PrintSpriteUpdateBuffer, PrintSprite and EED7.
|
||||||||
PrintColourCharacter | E6DC | EXX | Switch to the shadow registers. | |||||
E6DD | LD E,A | DE'=A*08. | ||||||
E6DE | LD D,$00 | |||||||
E6E0 | SLA E | |||||||
E6E2 | RL D | |||||||
E6E4 | SLA E | |||||||
E6E6 | RL D | |||||||
E6E8 | SLA E | |||||||
E6EA | RL D | |||||||
E6EC | LD HL,($5C36) | HL'=*CHARS+DE'. | ||||||
E6EF | ADD HL,DE | |||||||
E6F0 | LD DE,($5C84) | Increment *DF_CC by one. | ||||||
E6F4 | INC DE | |||||||
E6F5 | LD ($5C84),DE | |||||||
E6F9 | DEC DE | Decrease DE' by one. | ||||||
All character blocks are 1 x 8 bytes.
Copy the data from the current character set to the screen buffer.
|
||||||||
E6FA | LD B,$08 | B'=08 (byte counter). | ||||||
PrintColourCharacter_Loop | E6FC | LD A,(HL) | Fetch the byte from the character set. | |||||
E6FD | LD (DE),A | Write the byte to the screen buffer. | ||||||
E6FE | INC HL | Increment the character set data pointer in HL' by one. | ||||||
E6FF | INC D | Move down one line in the screen buffer. | ||||||
E700 | DJNZ PrintColourCharacter_Loop | Decrease the byte counter by one and loop back to PrintColourCharacter_Loop until all lines of the letter have been written to the screen buffer. | ||||||
Calculate the attribute buffer position.
|
||||||||
E702 | LD BC,($5C88) | BC'=*S_POSN. | ||||||
E706 | LD HL,$5800 | HL'=5800 (attribute buffer location). | ||||||
E709 | DEC C | Decrease C' by one. | ||||||
E70A | LD ($5C88),BC | Write BC' to *S_POSN. | ||||||
E70E | INC C | Increment C' by one. | ||||||
E70F | LD A,$21 | E'=21-C'. | ||||||
E711 | SUB C | |||||||
E712 | LD E,A | |||||||
E713 | LD D,$00 | D'=00. | ||||||
E715 | ADD HL,DE | HL'+=DE'. | ||||||
E716 | LD A,$18 | E'=18-B'. | ||||||
E718 | SUB B | |||||||
E719 | LD E,A | |||||||
E71A | SLA E | Shift E' left four positions (with carry). | ||||||
E71C | SLA E | |||||||
E71E | SLA E | |||||||
E720 | SLA E | |||||||
E722 | RL D | Rotate D' left. | ||||||
E724 | SLA E | Shift E' left (with carry). | ||||||
E726 | RL D | Rotate D' left. | ||||||
E728 | ADD HL,DE | HL'+=DE'. | ||||||
E729 | LD A,($5C8F) | A=*ATTR_T. | ||||||
E72C | LD (HL),A | Write A to *HL'. | ||||||
E72D | EXX | Switch back to the normal registers. | ||||||
E72E | RET | Return. |
Prev: E6BC | Up: Map | Next: E72F |