Prev: 43731 Up: Map Next: 43773
43757: Turn Robot Right
Used by the routine at MoveRobot.
Turns the robot a quarter of a turn, so that its direction goes up by one. The robot is moved to the start of the cell, and it gets one of the types for turning (32 to 47).
Input
A Controls
IX Robot
TurnRobotRight 43757 RES 0,A Clear the bit of the controls for turning right...
43759 LD (38437),A ...and store them.
43762 LD A,(IX+0) Fetch the type of the robot.
43765 ADD A,4 Go forward by one direction...
43767 AND 15
43769 OR 34 ...keep the bits that are used for the sprite and mark it as turning.
43771 JR TurnRobot_Store Jump to store the type and finish.
Prev: 43731 Up: Map Next: 43773