Moving the Cursor's X Position
If the display has not yet reached the end of a line, then move the cursor to the right. More formally,
if the following are true:
- value of cell 27 at time t = 1
- cursor x at time t < 39
then cursor x at time (t + 1) = (cursor x at time t) + 1
For example, suppose that the following are true:
- value of cell 27 at time 11 = 1
- cursor x at time 11 = 2
The cursor's x value is 2. Thus, the cursor's x value is less than 39. Then we conclude that
cursor x at time (11 + 1) = (cursor x at time 11) + 1
After some substitutions and simplification, this becomes:
cursor x at time 12 = 3
click here for the full proof.
Try running the simulator below to see the display cursor x value increase.
Time: 0
LW Computer IO Simulator
Comments
Please log in to add comments