![]() |
Routines |
| Prev: 29736 | Up: Map | Next: 29789 |
|
Used by the routine at HorizontalRun_RightRun.
Rotates one character row right by one bit.
|
||||
| HorizontalRun_Right | 29765 | PUSH BC | Stash BC and HL on the stack. | |
| 29766 | PUSH HL | |||
|
The width immediate is self-modified by VerticalRun.
|
||||
| 29767 | LD B,0 | Load that width. | ||
| 29769 | PUSH HL | Copy HL to DE (using the stack). | ||
| 29770 | POP DE | |||
|
Rotate this row right by one bit.
|
||||
| HorizontalRun_RightBit | 29771 | RR (HL) | Rotate this byte right. | |
| 29773 | INC HL | Step on one byte. | ||
| 29774 | DJNZ HorizontalRun_RightBit | Jump to HorizontalRun_RightBit until the width is rotated. | ||
| 29776 | EX DE,HL | Point HL at the start of the row. | ||
| 29777 | RES 7,(HL) | Clear bit 7. | ||
| 29779 | JR NC,HorizontalRun_Right_Restore | Jump to HorizontalRun_Right_Restore if the outgoing bit is reset. | ||
| 29781 | SET 7,(HL) | Set bit 7. | ||
|
Restore the pointers after the wrap.
|
||||
| HorizontalRun_Right_Restore | 29783 | POP HL | Restore HL and BC from the stack. | |
| 29784 | POP BC | |||
| 29785 | INC H | Step to the next pixel row. | ||
| 29786 | DJNZ HorizontalRun_Right | Jump to HorizontalRun_Right until eight pixel rows are done. | ||
| 29788 | RET | Return. | ||
| Prev: 29736 | Up: Map | Next: 29789 |