![]() |
Routines |
| Prev: 85D9 | Up: Map | Next: 8606 |
|
||||||||||||
|
Calculates the new address for writing a sprite pixel, in an upward direction, taking into consideration the screen memory layout.
|
||||||||||||
| ScreenPos1PixelAbove | 85F6 | DEC H | Decrement H by one to move up one pixel on screen. | |||||||||
| 85F7 | LD A,H | Store the inverted result in A. | ||||||||||
| 85F8 | CPL | |||||||||||
| 85F9 | AND %00000111 | Keep only bits 0-2. | ||||||||||
| 85FB | RET NZ | If a screen bank boundary has not been crossed then return. | ||||||||||
| 85FC | LD A,L | Else subtract 20 from L. | ||||||||||
| 85FD | SUB $20 | |||||||||||
| 85FF | LD L,A | |||||||||||
| 8600 | RET C | If there is any carry then return. | ||||||||||
| 8601 | LD A,H | Else add 08 to H and return. | ||||||||||
| 8602 | ADD A,$08 | |||||||||||
| 8604 | LD H,A | |||||||||||
| 8605 | RET | Return. | ||||||||||
| Prev: 85D9 | Up: Map | Next: 8606 |