Registers |
The CPU has a small amount of special memory known as registers. These are split into 32bits (or 64bits). There are a number of special registers as well as a set of general purpose registers which can be used by any program. All instructions must work from registers.
The special registers you need to know about are -
- PC - Program counter
- MAR - Memory address register
- MDR - Memory data register
- CIR - Current instruction register
- ACC - Accumilator
- Status - Keeps track of any logical operation
- Interrupt - Keeps a track of any interrupts which occur
The status register is used for any logical comparison. When two values are compared the result is stored in the status register (for example 4 > 5 is false!). You can then do a conditional jump. If the status is true then the jump will occur otherwise it will not. This is how control and itteration can be done in machine code.