![]() |
Routines |
| Prev: 62964 | Up: Map | Next: 63074 |
|
Used by the routines at JumpTable_PrintCharacter, Draw_Box, Draw_StatusIcons, Draw_StatusIcons_Branch, Print_Message, Print_Sprite, Draw_Entity and Fill_Tiles.
Prints one character using *CHARS.
|
||||||||
| Print_Character | 62986 | PUSH AF | Stash the character and IX on the stack. | |||||
| 62987 | PUSH IX | |||||||
| 62989 | EXX | Switch to the shadow registers. | ||||||
| 62990 | LD L,A | HL=the character code*8. | ||||||
| 62991 | LD H,0 | |||||||
| 62993 | ADD HL,HL | |||||||
| 62994 | ADD HL,HL | |||||||
| 62995 | ADD HL,HL | |||||||
| 62996 | LD DE,(23606) | HL=*CHARS+HL. | ||||||
| 63000 | ADD HL,DE | |||||||
| 63001 | LD DE,(23684) | Advance *DF_CC and leave DE on the cell just claimed. | ||||||
| 63005 | INC DE | |||||||
| 63006 | LD (23684),DE | |||||||
| 63010 | DEC DE | |||||||
|
Copy the eight pixel rows into the screen buffer.
|
||||||||
| 63011 | LD B,8 | Set the pixel-row counter to 8. | ||||||
| Print_Character_Target | 63013 | LD A,(HL) | Copy one pixel row and move down one screen line. | |||||
| 63014 | LD (DE),A | |||||||
| 63015 | INC D | |||||||
| 63016 | INC HL | |||||||
| 63017 | DJNZ Print_Character_Target | Decrease the row counter and loop back to Print_Character_Target until all 8 rows are written. | ||||||
|
Write *ATTR_T into the matching attribute cell.
|
||||||||
| 63019 | LD BC,(23688) | Decrease the print column in *S_POSN. | ||||||
| 63023 | DEC C | |||||||
| 63024 | LD (23688),BC | |||||||
| 63028 | EX DE,HL | Point HL at the matching attribute cell. | ||||||
| 63029 | DEC H | |||||||
| 63030 | LD A,H | |||||||
| 63031 | RRCA | |||||||
| 63032 | RRCA | |||||||
| 63033 | RRCA | |||||||
| 63034 | AND %00000011 | Keep only bits 0-1 of the display-file high byte. | ||||||
| 63036 | OR %01011000 | Set the attribute-file bit. | ||||||
| 63038 | LD H,A | Merge the attribute-file high byte. | ||||||
| 63039 | LD A,(23697) | Jump to Print_Character_Continue if *MASK_T is set. | ||||||
| 63042 | OR A | |||||||
| 63043 | JR NZ,Print_Character_Continue | |||||||
| 63045 | LD A,(23695) | Write *ATTR_T to that attribute cell. | ||||||
| 63048 | LD (HL),A | |||||||
| 63049 | EXX | Switch back. | ||||||
| 63050 | POP IX | Restore IX and the character from the stack. | ||||||
| 63052 | POP AF | |||||||
| 63053 | RET | Return. | ||||||
| Print_Character_Continue | 63054 | PUSH HL | Merge the existing attribute through the mask. | |||||
| 63055 | AND (HL) | |||||||
| 63056 | LD (HL),A | |||||||
| 63057 | LD HL,23695 | Keep the paper bits from *ATTR_T. | ||||||
| 63060 | LD A,(23697) | |||||||
| 63063 | XOR %11111111 | Invert the mask. | ||||||
| 63065 | AND (HL) | Merge the ink bits and write the attribute. | ||||||
| 63066 | POP HL | |||||||
| 63067 | OR (HL) | |||||||
| 63068 | LD (HL),A | |||||||
| 63069 | EXX | Switch back. | ||||||
| 63070 | POP IX | Restore IX and the character from the stack. | ||||||
| 63072 | POP AF | |||||||
| 63073 | RET | Return. | ||||||
|
View the equivalent code in Booty.
|
||||||||
| Prev: 62964 | Up: Map | Next: 63074 |