![]() |
Routines |
Prev: 25840 | Up: Map | Next: 25918 |
|
||||||||
PrintStringColour | 25880 | PUSH HL | Stash HL on the stack. | |||||
25881 | CALL ScreenAddress | Call ScreenAddress. | ||||||
25884 | LD A,(DE) | Fetch the attribute byte. | ||||||
25885 | EX AF,AF' | Switch to the shadow AF register. | ||||||
25886 | INC DE | Increment DE by one to point to the text of the string. | ||||||
This entry point is used by the routines at DisplayPlaceName and DisplayNightDriver.
|
||||||||
PrintStringColour_0 | 25887 | EXX | Switch to the shadow registers. | |||||
25888 | POP HL | Restore HL from the stack. | ||||||
25889 | CALL AttributeAddress | Call AttributeAddress. | ||||||
This entry point is used by the routine at MenuWriteText.
|
||||||||
PrintString_Loop | 25892 | EXX | Switch back to the normal registers. | |||||
25893 | LD A,(DE) | Fetch the character to print. | ||||||
25894 | BIT 7,A | If bit 7 is set (which signifies the end of the string), jump to PrintString_LastCharacter. | ||||||
25896 | JR NZ,PrintString_LastCharacter | |||||||
25898 | CALL PrintScreen | Call PrintScreen. | ||||||
25901 | INC DE | Increment DE by one. | ||||||
25902 | EXX | Switch to the shadow registers. | ||||||
25903 | EX AF,AF' | Switch to the shadow AF register. | ||||||
25904 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
25905 | INC L | Increment L by one. | ||||||
25906 | EX AF,AF' | Switch to the shadow AF register. | ||||||
25907 | JR PrintString_Loop | Jump to PrintString_Loop. | ||||||
Because the last character contains the terminator, it needs to be handled separately.
|
||||||||
PrintString_LastCharacter | 25909 | AND %01111111 | Keep only bits 0-6 (i.e. strip the bit 7 terminator). | |||||
25911 | CALL PrintScreen | Call PrintScreen. | ||||||
25914 | EXX | Switch to the shadow registers. | ||||||
25915 | EX AF,AF' | Switch to the shadow AF register. | ||||||
25916 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
25917 | RET | Return. | ||||||
View the equivalent code in;
|
Prev: 25840 | Up: Map | Next: 25918 |