Prev: AFDC Up: Map Next: AFEE
AFE1: Move Light Up
Is meant to move a light one cell up. However, the instruction that should take one row off the address is missing, so the cell that is tested is the cell that the light is already in. That cell never has the attribute of the frame, and so the light always turns instead.
Input
DE Address of the attribute that the light is in
IX Light
MoveLightUp AFE1 LD L,E Point HL at the cell that the light is in.
AFE2 LD H,D
AFE3 LD BC,$0020 Use a row of 20 characters.
AFE6 AND A Clear the carry flag.
This entry point is used by the routine at MoveLightDown.
MoveLight_Test AFE7 LD A,(HL) Fetch the attribute of the cell.
AFE8 CP $48 Jump to turn the light sideways if it is not part of the frame.
AFEA JR NZ,TurnLightHorizontally
AFEC JR MoveLight_Move Jump to move the light.
Prev: AFDC Up: Map Next: AFEE