Prev: 47624 Up: Map Next: 47650
47637: Guard Heading South
Keeps a guard heading south, at a speed of 2, until it hits something. It then turns west.
Input
IX Address of the guard
Output
H Speed in Y
L Speed in X
GuardHeadingSouth 47637 LD HL,65024 Set the speed in X to 0 and the speed in Y to 254.
47640 BIT 1,(IX+12) Test whether the guard has hit something along the Y axis.
47644 RET Z Return if it has not.
47645 LD HL,254 Set the speed in X to 254 and the speed in Y to 0.
47648 JR TurnGuard Jump to TurnGuard to turn the guard.
Prev: 47624 Up: Map Next: 47650