![]() |
Routines |
| Prev: 9AAD | Up: Map | Next: 9ACB |
|
Used by the routines at DrawGraphic_Flipped, DrawGraphic_RotatedHalf, DrawGraphic_TransposedFlipped, DrawGraphic_RotatedRight, SetAttributes_Flipped, SetAttributes_RotatedHalf, SetAttributes_TransposedFlipped and SetAttributes_RotatedRight.
Moves DE on to the first byte of the last row of a graphic, which is the width multiplied by one less than the height.
|
||||||||||||||||
| FindLastRow | 9ABA | PUSH HL | Stash HL on the stack. | |||||||||||||
| 9ABB | PUSH DE | Stash DE on the stack. | ||||||||||||||
| 9ABC | LD A,B | Fetch the width of the graphic. | ||||||||||||||
| 9ABD | LD E,C | Fetch the height of the graphic. | ||||||||||||||
| 9ABE | DEC E | Decrease it by one. | ||||||||||||||
| 9ABF | LD D,$00 | Clear the high byte of the height. | ||||||||||||||
| 9AC1 | PUSH BC | Stash BC on the stack. | ||||||||||||||
| 9AC2 | CALL MultiplyAByDE | Call MultiplyAByDE to multiply the width by one less than the height. | ||||||||||||||
| 9AC5 | POP BC | Restore BC from the stack. | ||||||||||||||
| 9AC6 | POP DE | Restore DE from the stack. | ||||||||||||||
| 9AC7 | ADD HL,DE | Add DE to the result. | ||||||||||||||
| 9AC8 | EX DE,HL | Switch DE and HL. | ||||||||||||||
| 9AC9 | POP HL | Restore HL from the stack. | ||||||||||||||
| 9ACA | RET | Return. | ||||||||||||||
| Prev: 9AAD | Up: Map | Next: 9ACB |