|
Finally, the notations ... <- m[x] and m[x] <- ... require more explanation. The output of memory is never copied directly into any register except MBR, so the load instructions that copy m[x] into A are really more complex in that they first cause the value to go from memory to the MBR, and then from the MBR to A. The reverse happens when A's value is stored into memory. In all of these cases dealing with memory, the first step is to load the MAR with x or S and set the two memory control wires MA and WR. If the operation is write, MBR is also loaded at the outset for either A or IR. After a delay, the output of memory is copied into the MBR, which is then copied into its final destination. These operations have to be carefully timed because the memory must be given enough time to retrieve or store values. Also, when m[x] is used as an operand in an arithmetic or logical operation, the value is really coming from the TMP register, which received a copy of the MBR after the memory read. Another possibility for the circuit designers would have been to let MBR act as the other input to the ALU, thereby avoiding a TMP register altogether. |