next up previous
Next: PC operations, including the Up: Implementation Previous: Implementation

ACC operations: the detailed steps to obey ADD, SUB, LDA & STO

ADD and SUB require the use of an Arithmetic Unit (often generically known as an Arithmetic & Logic Unit - ALU). To minimise the number of connections to the ACC, we also use the ALU for LDA and STO. Each of these 4 operations can be performed by a series of steps, which turn out to be very similar from one operation to the next, and can be summarised by the following table, listing the steps in the order they are obeyed:

ADD SUB LDA STO  
        send operand-location $\Rightarrow$ memory
$\surd$ $\surd$ $\surd$   read memory
        copy operand from memory $\Rightarrow$ ALU
$\surd$ $\surd$   $\surd$ copy ACC contents $\Rightarrow$ALU
+ - $\Rightarrow$ $\Rightarrow$ perform action in ALU
        ( $\Rightarrow$: copy input to output)
$\surd$ $\surd$ $\surd$   ALU result $\Rightarrow$ ACC
        send operand-location $\Rightarrow$ memory
      $\surd$ ALU result $\Rightarrow$ memory
        write memory
See figure 3.


  
Figure 3: MU0 + ACC operations
\includegraphics[angle=270,width=15cm]{mu0_accops.eps}

This is not needed for the 4 operations described above, but for JGE and JNE we need to be able to test the current value in the ACC against the appropriate condition ($\ge$0 or $\ne$0) and let the control unit know if the result is true or false - maybe we could do this in the ALU as well, or maybe there is some extra hardware directly attached to the ACC.


next up previous
Next: PC operations, including the Up: Implementation Previous: Implementation
Pete Jinks
1998-10-30