![]() |
Routines |
| Prev: C29C | Up: Map | Next: C306 |
|
Used by the routine at CheckTVFlagAndProcess.
On a new line, resets the parser row. Any other character is printed.
|
||||||||
| ProcessScreenCharacter | C2BA | PUSH HL | Read the storage decorative line screen position. | |||||
| C2BB | PUSH BC | |||||||
| C2BC | PUSH AF | |||||||
| C2BD | LD HL,($C1F8) | |||||||
| C2C0 | LD A,($C1FA) | Read the decorative line into C. | ||||||
| C2C3 | LD C,A | |||||||
| C2C4 | POP AF | Restore the character from the stack. | ||||||
| C2C5 | PUSH AF | Keep a copy of the character on the stack. | ||||||
| C2C6 | CP $0D | Jump ahead to ProcessScreenCharacter_ScreenWidthCount if this character is not a new line (0D). | ||||||
| C2C8 | JR NZ,ProcessScreenCharacter_ScreenWidthCount | |||||||
| ProcessScreenCharacter_Loop | C2CA | LD A,($A019) | Jump to ProcessScreenCharacter_Next if the parser is not 0F. | |||||
| C2CD | CP $0F | |||||||
| C2CF | JR NZ,ProcessScreenCharacter_Next | |||||||
|
Scroll screen and reset display.
|
||||||||
| C2D1 | CALL ScrollScreenAndResetDisplay | Call ScrollScreenAndResetDisplay to scroll the screen and reset the display. | ||||||
| C2D4 | LD A,$FF | Start the count at FF so the next step makes it zero. | ||||||
| ProcessScreenCharacter_Next | C2D6 | INC A | Add one to the count at A019 and point HL at 5020. | |||||
| C2D7 | LD ($A019),A | |||||||
| C2DA | LD HL,$5020 | |||||||
| C2DD | LD C,$02 | Use a length of 02. | ||||||
|
Update screen display.
|
||||||||
| C2DF | CALL UpdateScreenDisplay | Call UpdateScreenDisplay to update the screen. | ||||||
|
Screen flag selects the width.
|
||||||||
| C2E2 | LD A,($C128) | Take 24 and go to ProcessScreenCharacter_RecordScreenWidth if the byte at C128 is zero. | ||||||
| C2E5 | AND A | |||||||
| C2E6 | LD A,$24 | |||||||
| C2E8 | JR Z,ProcessScreenCharacter_RecordScreenWidth | |||||||
| C2EA | LD A,$12 | Take a width of 12 and store it from ProcessScreenCharacter_RecordScreenWidth. | ||||||
| C2EC | JR ProcessScreenCharacter_RecordScreenWidth | |||||||
|
Print this character and leave the row once the width runs out.
Print character.
|
||||||||
| ProcessScreenCharacter_ScreenWidthCount | C2EE | CALL PrintCharacter | Call PrintCharacter to print this character. | |||||
| C2F1 | LD A,($C1F5) | Jump back to ProcessScreenCharacter_Loop if the count is finished. | ||||||
| C2F4 | DEC A | |||||||
| C2F5 | JP Z,ProcessScreenCharacter_Loop | |||||||
| ProcessScreenCharacter_RecordScreenWidth | C2F8 | LD ($C1F5),A | Record the screen width and record the storage decorative line screen position. | |||||
| C2FB | LD ($C1F8),HL | |||||||
| C2FE | LD A,C | |||||||
| C2FF | LD ($C1FA),A | Record the decorative line. | ||||||
| C302 | POP AF | Restore the saved result, the saved count and the saved pointer from the stack. | ||||||
| C303 | POP BC | |||||||
| C304 | POP HL | |||||||
| C305 | RET | Return. | ||||||
| Prev: C29C | Up: Map | Next: C306 |