![]() |
Routines |
| Prev: 34187 | Up: Map | Next: 34378 |
|
Used by the routine at Print_Character.
Scrolls the line buffer up by four rows of 32 bytes and fills the vacated row with spaces.
|
||||
| Print_ScrollTheLineBuffer | 34317 | PUSH HL | Save HL, DE, BC and AF, and point HL at the screen line 20608. | |
| 34318 | PUSH DE | |||
| 34319 | PUSH BC | |||
| 34320 | PUSH AF | |||
| 34321 | LD HL,20608 | |||
| 34324 | LD DE,20576 | Point DE at the line buffer. | ||
| 34327 | LD A,4 | Load 4 before the day and night test. | ||
| 34329 | LD B,0 | Start the token count at zero. | ||
| Print_ScrollTheLineBuffer_ScrollOneCharacterRow | 34331 | PUSH HL | Save the screen pointers and count 8 pixel rows. | |
| 34332 | PUSH DE | |||
| 34333 | LD C,8 | |||
| Print_ScrollTheLineBuffer_Loop | 34335 | PUSH HL | Copy the prepared bytes. | |
| 34336 | PUSH DE | |||
| 34337 | PUSH BC | |||
| 34338 | LD C,32 | |||
| 34340 | LDIR | |||
| 34342 | POP BC | Restore the screen pointers from the stack, step to the next pixel row, and jump back to Print_ScrollTheLineBuffer_Loop until the count in C reaches zero. | ||
| 34343 | POP DE | |||
| 34344 | POP HL | |||
| 34345 | INC H | |||
| 34346 | INC D | |||
| 34347 | DEC C | |||
| 34348 | JR NZ,Print_ScrollTheLineBuffer_Loop | |||
| 34350 | POP DE | Restore the saved screen pointers from the stack and set BC to 32, one screen row. | ||
| 34351 | POP HL | |||
| 34352 | LD C,32 | |||
| 34354 | ADD HL,BC | Step one screen row, 32 bytes. | ||
| 34355 | EX DE,HL | Swap the two screen pointers. | ||
| 34356 | ADD HL,BC | Step the other pointer one screen row, 32 bytes. | ||
| 34357 | EX DE,HL | Swap the two screen pointers. | ||
| 34358 | DEC A | Jump back to Print_ScrollTheLineBuffer_ScrollOneCharacterRow until the row count in A reaches zero. | ||
| 34359 | JR NZ,Print_ScrollTheLineBuffer_ScrollOneCharacterRow | |||
| 34361 | LD B,32 | Count 32 passes. | ||
| 34363 | LD HL,20704 | Point HL at the attribute line. | ||
| 34366 | LD A,32 | Use the character ' '. | ||
|
Blank the new line with spaces.
|
||||
| Print_ScrollTheLineBuffer_BlankTheNewLine | 34368 | CALL Print_RomFont | Call Print_RomFont to draw this character with the ROM font. | |
| 34371 | DJNZ Print_ScrollTheLineBuffer_BlankTheNewLine | Loop back to Print_ScrollTheLineBuffer_BlankTheNewLine until 32 runs out. | ||
| 34373 | POP AF | Restore AF, BC, DE and HL from the stack. | ||
| 34374 | POP BC | |||
| 34375 | POP DE | |||
| 34376 | POP HL | |||
| 34377 | RET | Return. | ||
| Prev: 34187 | Up: Map | Next: 34378 |