![]() |
Routines |
| Prev: 45878 | Up: Map | Next: 45946 |
|
Used by the routine at DrawShot.
|
||||||||||||
| EraseRows | 45910 | EXX | Switch to the alternate registers. | |||||||||
| 45911 | LD A,B | A=B. | ||||||||||
| 45912 | AND A | Jump to EraseRows_Finish if A is zero. | ||||||||||
| 45913 | JR Z,EraseRows_Finish | |||||||||||
| 45915 | LD C,B | C=B. | ||||||||||
| 45916 | LD A,(41431) | The rows to erase. | ||||||||||
| EraseRows_Row | 45919 | EX AF,AF' | Switch to the alternate accumulator and flags. | |||||||||
| 45920 | LD B,C | B=C. | ||||||||||
| 45921 | PUSH DE | Stash DE on the stack. | ||||||||||
| 45922 | PUSH HL | Stash HL on the stack. | ||||||||||
| EraseRows_Byte | 45923 | LD A,(DE) | Read DE. | |||||||||
| 45924 | CPL | Invert A. | ||||||||||
| 45925 | AND (HL) | Keep the bits of A that are set in the byte at HL. | ||||||||||
| 45926 | LD (HL),A | Write A where HL points. | ||||||||||
| 45927 | INC L | Advance L. | ||||||||||
| 45928 | INC DE | Advance DE. | ||||||||||
| 45929 | DJNZ EraseRows_Byte | Decrease B and jump to EraseRows_Byte until none remain. | ||||||||||
| 45931 | POP HL | Bring HL back off the stack. | ||||||||||
| 45932 | CALL MoveUpARow | Call MoveUpARow. | ||||||||||
| 45935 | POP DE | Bring DE back off the stack. | ||||||||||
| 45936 | LD A,8 | A=8. | ||||||||||
| 45938 | ADD A,E | A gains E. | ||||||||||
| 45939 | LD E,A | E=A. | ||||||||||
| 45940 | EX AF,AF' | Switch to the alternate accumulator and flags. | ||||||||||
| 45941 | DEC A | Step A back. | ||||||||||
| 45942 | JR NZ,EraseRows_Row | Jump to EraseRows_Row if the zero flag is clear. | ||||||||||
| EraseRows_Finish | 45944 | EXX | Switch to the alternate registers. | |||||||||
| 45945 | RET | Return. | ||||||||||
| Prev: 45878 | Up: Map | Next: 45946 |