Tracking The Number of Characters

if the following are true:
  • value of cell 27 at time t = 1
  • number of characters read at t < value of cell 26 at time t

then number of characters read at (t + 1) = (number of characters read at t) + 1

While the display is drawing characters, it increments the number of characers read from memory so far by 1. This tells the display which character to draw next.

For example, if the following are true:

  • value of cell 27 at time 11 = 1
  • number of characters read at 11 = 0
  • value of cell 26 at time 11 = 1

then number of characters read at (11 + 1) = (number of characters read at 11) + 1

After some substitutions and simplification, this becomes:

number of characters read at 12 = 1

Try running the simulator below to see the "Characters Read" count increase.

Time: 0
LW Computer IO Simulator

Comments

Please log in to add comments