![]() |
Routines |
| Prev: 45858 | Up: Map | Next: 45910 |
|
Used by the routine at DrawShot.
Draws rows of a buffer onto the screen by ORing them in, going up the screen from the row that HL is at. The number of rows is the value in 41432 and a row is B bytes of the buffer, which has eight bytes to a row.
|
||||||||||||
| DrawRows | 45878 | LD A,B | A=B. | |||||||||
| 45879 | AND A | Return if A is zero. | ||||||||||
| 45880 | RET Z | |||||||||||
| 45881 | LD C,B | C=B. | ||||||||||
| 45882 | LD A,(41432) | The rows to draw. | ||||||||||
| DrawRows_Row | 45885 | EX AF,AF' | Switch to the alternate accumulator and flags. | |||||||||
| 45886 | LD B,C | B=C. | ||||||||||
| 45887 | PUSH DE | Stash DE on the stack. | ||||||||||
| 45888 | PUSH HL | Stash HL on the stack. | ||||||||||
| DrawRows_Byte | 45889 | LD A,(DE) | Read DE. | |||||||||
| 45890 | OR (HL) | Set the bits of A that are set in the byte at HL. | ||||||||||
| 45891 | LD (HL),A | Write A where HL points. | ||||||||||
| 45892 | INC L | Advance L. | ||||||||||
| 45893 | INC DE | Advance DE. | ||||||||||
| 45894 | DJNZ DrawRows_Byte | Decrease B and jump to DrawRows_Byte until none remain. | ||||||||||
| 45896 | POP HL | Bring HL back off the stack. | ||||||||||
| 45897 | CALL MoveUpARow | Call MoveUpARow. | ||||||||||
| 45900 | POP DE | Bring DE back off the stack. | ||||||||||
| 45901 | LD A,8 | A=8. | ||||||||||
| 45903 | ADD A,E | A gains E. | ||||||||||
| 45904 | LD E,A | E=A. | ||||||||||
| 45905 | EX AF,AF' | Switch to the alternate accumulator and flags. | ||||||||||
| 45906 | DEC A | Step A back. | ||||||||||
| 45907 | JR NZ,DrawRows_Row | Jump to DrawRows_Row if the zero flag is clear. | ||||||||||
| 45909 | RET | Return. | ||||||||||
| Prev: 45858 | Up: Map | Next: 45910 |