Prev: 47611 Up: Map Next: 47637
47624: Guard Heading East
Keeps a guard heading east, at a speed of 2, until it hits something. It then turns south.
Input
IX Address of the guard
Output
H Speed in Y
L Speed in X
GuardHeadingEast 47624 LD HL,2 Set the speed in X to 2 and the speed in Y to 0.
47627 BIT 0,(IX+12) Test whether the guard has hit something along the X axis.
47631 RET Z Return if it has not.
47632 LD HL,65024 Set the speed in X to 0 and the speed in Y to 254.
47635 JR TurnGuard Jump to TurnGuard to turn the guard.
Prev: 47611 Up: Map Next: 47637