Prev: 47584 Up: Map Next: 47624
47611: Guard Heading North
Keeps a guard heading north, at a speed of 2, until it hits something. It then turns east.
Input
IX Address of the guard
Output
H Speed in Y
L Speed in X
GuardHeadingNorth 47611 LD HL,512 Set the speed in X to 0 and the speed in Y to 2.
47614 BIT 1,(IX+12) Test whether the guard has hit something along the Y axis.
47618 RET Z Return if it has not.
47619 LD HL,2 Set the speed in X to 2 and the speed in Y to 0.
47622 JR TurnGuard Jump to TurnGuard to turn the guard.
Prev: 47584 Up: Map Next: 47624