Routines |
Prev: EC6F | Up: Map | Next: ECDC |
Used by the routine at EBE0.
|
||||
ECA2 | LD ($ECDC),A | Store the current frame number. | ||
ECA5 | LD HL,$ECE4 | Point HL to the temporary store. | ||
ECA8 | LD DE,($ECE0) | Point DE to the next graphic to print. | ||
ECAC | LD B,$10 | (16) pairs of cells to copy. | ||
ECAE | LD (HL),$00 | Clear the first cell. | ||
ECB0 | INC HL | Move to the next cell. | ||
ECB1 | EX DE,HL | Copy it from the graphic entry to the temporary store. | ||
ECB2 | LD A,(HL) | |||
ECB3 | EX DE,HL | |||
ECB4 | LD (HL),A | |||
ECB5 | INC HL | Move to the next cell. | ||
ECB6 | INC DE | |||
ECB7 | EX DE,HL | Copy the byte from the graphic entry to the temporary store. | ||
ECB8 | LD A,(HL) | |||
ECB9 | EX DE,HL | |||
ECBA | LD (HL),A | |||
ECBB | INC HL | Move to the next cell. | ||
ECBC | INC DE | |||
ECBD | DJNZ $ECAE | Loop while there is more to copy. | ||
ECBF | LD A,($ECDC) | Get the frame number. | ||
ECC2 | LD B,A | Store this in B. | ||
ECC3 | CP $00 | Return if the frame is 0 - no update needed. | ||
ECC5 | RET Z | |||
ECC6 | LD A,$08 | Invert the number of cells to update. | ||
ECC8 | SUB B | |||
ECC9 | LD B,A | |||
ECCA | PUSH BC | Store BC | ||
ECCB | LD HL,$ED13 | Point HL to the back of the buffer. | ||
ECCE | LD B,$30 | 30 cells to update. | ||
ECD0 | LD A,(HL) | Get the next byte. | ||
ECD1 | RLA | Shift it to the left. | ||
ECD2 | PUSH AF | Store AF. | ||
ECD3 | LD (HL),A | Set the data back. | ||
ECD4 | DEC HL | Move to the previous cell. | ||
ECD5 | POP AF | Restore AF. | ||
ECD6 | DJNZ $ECD0 | Loop back if there are more cells. | ||
ECD8 | POP BC | Loop back until we get the right frame number to copy. | ||
ECD9 | DJNZ $ECCA | |||
ECDB | RET |
Prev: EC6F | Up: Map | Next: ECDC |