![]() |
Routines |
| Prev: 9F21 | Up: Map | Next: 9F40 |
|
Not a loop: seven copies of the same two instructions, one after another, so that jumping in n pairs from the top performs 7 - n shifts with no counter and no branch. The whole cost of positioning a sprite to the pixel is one patched jump.
|
||||
| SHIFT_CHAIN | 9F2B | ADD HL,HL | Seven ADD HL,HL / ADC A,A pairs. Entering at the top shifts seven times, two bytes in six, and so on. | |
| 9F2C | ADC A,A | |||
| 9F2D | ADD HL,HL | |||
| 9F2E | ADC A,A | |||
| 9F2F | ADD HL,HL | |||
| 9F30 | ADC A,A | |||
| 9F31 | ADD HL,HL | |||
| 9F32 | ADC A,A | |||
| 9F33 | ADD HL,HL | |||
| 9F34 | ADC A,A | |||
| 9F35 | ADD HL,HL | |||
| 9F36 | ADC A,A | |||
| 9F37 | ADD HL,HL | |||
| 9F38 | ADC A,A | |||
| 9F39 | EX DE,HL | Whatever the shift, the row ends up here to be XORed onto the screen. | ||
| 9F3A | EX (SP),HL | |||
| 9F3B | XOR (HL) | |||
| 9F3C | LD (HL),A | |||
| 9F3D | INC L | |||
| 9F3E | JR XOR_BYTE | |||
| Prev: 9F21 | Up: Map | Next: 9F40 |