![]() |
Routines |
| Prev: 58396 | Up: Map | Next: 58535 |
|
Draws a piece of terrain that is one byte wide, going up the screen two pixel rows at a time, using a word of the picture for each pair of rows. The entry point at DrawOneByteRows moves one column to the right first.
|
||||||||||||
| DrawOneByteRows | 58507 | INC L | Advance L. | |||||||||
| DrawOneByteRows_Start | 58508 | LD B,A | B=A. | |||||||||
| DrawOneByteRows_Loop | 58509 | POP DE | Bring DE back off the stack. | |||||||||
| 58510 | LD (HL),E | Write E where HL points. | ||||||||||
| 58511 | DEC H | Step H back. | ||||||||||
| 58512 | LD (HL),D | Write D where HL points. | ||||||||||
| 58513 | DEC H | Step H back. | ||||||||||
| 58514 | LD A,H | A=H. | ||||||||||
| 58515 | INC A | Advance A. | ||||||||||
| 58516 | AND %00000111 | Keep the bits of A that are set in 7. | ||||||||||
| 58518 | JR NZ,DrawOneByteRows_Next | Jump to DrawOneByteRows_Next if the zero flag is clear. | ||||||||||
| 58520 | LD A,L | A=L. | ||||||||||
| 58521 | SUB 32 | Subtract 32 from A. | ||||||||||
| 58523 | LD L,A | L=A. | ||||||||||
| 58524 | JR C,DrawOneByteRows_Next | Jump to DrawOneByteRows_Next if the carry flag is set. | ||||||||||
| 58526 | LD A,H | A=H. | ||||||||||
| 58527 | ADD A,8 | Add 8 to A. | ||||||||||
| 58529 | LD H,A | H=A. | ||||||||||
| DrawOneByteRows_Next | 58530 | DJNZ DrawOneByteRows_Loop | Decrease B and jump to DrawOneByteRows_Loop until none remain. | |||||||||
| 58532 | JP FinishStep | Jump to FinishStep. | ||||||||||
| Prev: 58396 | Up: Map | Next: 58535 |