6. Accumulator

accumulator

This is one of the general purpose registers but it is specifically used to 'accumulate' the result of the currently running instructions.

For example, a small piece of code needs to fetch a value from main memory and then add 3 to it and finally store the result back into memory. The accumulator will be used

LDA 3001 This instruction will load the data at address 3001 into the accumulator
ADC #3 This instruction adds 3 to the content of the accumulator
STA 3001 This instruction stores the content of the accumulator into main memory at location 3001

As shown above the role of the accumulator is to store intermediate results of the current data processing.

The final results are then either stored in another general purpose register or memory location.

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: programming an Intel CPU

 

Copyright © www.teach-ict.com