Switching Off The Network Device

If the network has finished copying data, then turn off the network device. More formally,

if the following are true:
  • byte at ID: x, cell #68 at time t = 1
  • byte at ID: x, cell #67 at time t = y_decimal
  • y in decimal = y_decimal
  • network bytes read from computer: x at time t = byte at ID: x, cell #66 at time t

then byte at ID: x, cell #68 at time (t + 1) = 0

After the network device has finished copying data from computer x to computer y, turn off computer x's network device. It will remain off until computer x asks the network device to send data again.

For example, suppose that the following are true:

  • byte at ID: "B", cell #66 at time 13 = 5
  • byte at ID: "B", cell #67 at time 13 = 65
  • byte at ID: "B", cell #68 at time 13 = 1
  • network bytes read from computer: "B" at time 13 = 5

The number of bytes read is equal to the value at cell #66 (5), so the network device is finished. And the destination is 65, or "A." Then:

byte at ID: "B", cell #68 at time (13 + 1) = 0

Which simplifies to:

byte at ID: "B", cell #68 at time 14 = 0

Try running the simulator below to see the network device copy values from computer B to computer A and then set computer B's memory cell #68 to 0.

Time: 0
LW Computer IO Simulator

Comments

Please log in to add comments