![]() |
Routines |
| Prev: E41C | Up: Map | Next: E4A7 |
|
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 | E48B | INC L | Advance L. | |||||||||
| DrawOneByteRows_Start | E48C | LD B,A | B=A. | |||||||||
| DrawOneByteRows_Loop | E48D | POP DE | Bring DE back off the stack. | |||||||||
| E48E | LD (HL),E | Write E where HL points. | ||||||||||
| E48F | DEC H | Step H back. | ||||||||||
| E490 | LD (HL),D | Write D where HL points. | ||||||||||
| E491 | DEC H | Step H back. | ||||||||||
| E492 | LD A,H | A=H. | ||||||||||
| E493 | INC A | Advance A. | ||||||||||
| E494 | AND %00000111 | Keep the bits of A that are set in 07. | ||||||||||
| E496 | JR NZ,DrawOneByteRows_Next | Jump to DrawOneByteRows_Next if the zero flag is clear. | ||||||||||
| E498 | LD A,L | A=L. | ||||||||||
| E499 | SUB $20 | Subtract 20 from A. | ||||||||||
| E49B | LD L,A | L=A. | ||||||||||
| E49C | JR C,DrawOneByteRows_Next | Jump to DrawOneByteRows_Next if the carry flag is set. | ||||||||||
| E49E | LD A,H | A=H. | ||||||||||
| E49F | ADD A,$08 | Add 08 to A. | ||||||||||
| E4A1 | LD H,A | H=A. | ||||||||||
| DrawOneByteRows_Next | E4A2 | DJNZ DrawOneByteRows_Loop | Decrease B and jump to DrawOneByteRows_Loop until none remain. | |||||||||
| E4A4 | JP FinishStep | Jump to FinishStep. | ||||||||||
| Prev: E41C | Up: Map | Next: E4A7 |