![]() |
Routines |
| Prev: 34265 | Up: Map | Next: 34310 |
|
||||||||||||
|
Calculates the new address for writing a sprite pixel, in an upward direction, taking into consideration the screen memory layout.
|
||||||||||||
| ScreenPos1PixelAbove | 34294 | DEC H | Decrement H by one to move up one pixel on screen. | |||||||||
| 34295 | LD A,H | Store the inverted result in A. | ||||||||||
| 34296 | CPL | |||||||||||
| 34297 | AND %00000111 | Keep only bits 0-2. | ||||||||||
| 34299 | RET NZ | If a screen bank boundary has not been crossed then return. | ||||||||||
| 34300 | LD A,L | Else subtract 32 from L. | ||||||||||
| 34301 | SUB 32 | |||||||||||
| 34303 | LD L,A | |||||||||||
| 34304 | RET C | If there is any carry then return. | ||||||||||
| 34305 | LD A,H | Else add 8 to H and return. | ||||||||||
| 34306 | ADD A,8 | |||||||||||
| 34308 | LD H,A | |||||||||||
| 34309 | RET | Return. | ||||||||||
| Prev: 34265 | Up: Map | Next: 34310 |