Add Registers
+27
@@ -0,0 +1,27 @@
|
|||||||
|
## Registers
|
||||||
|
Below is a list of the registers:
|
||||||
|
| Hex | Register | Description |
|
||||||
|
|----------------|----------|-----------------------------------------------------------------------------|
|
||||||
|
| System | MAR | Memory address register for the current instruction to be fetched from RAM.|
|
||||||
|
| System | STS | Status register, stores flags from calculations and comparisons. |
|
||||||
|
| System | CIR | Current instruction register. |
|
||||||
|
| System | PCX | Program counter. Stores the address of the next instruction |
|
||||||
|
| 0x00\dots 0x07 | RG0 \dots RG7 | General purpose registers for variables etc. |
|
||||||
|
| 0x08 | ACC | Accumulator for storing outputs of calculations. |
|
||||||
|
| 0x09 | MDR | Memory data register for moving data between RAM and registers |
|
||||||
|
| 0x0A | SPR | Stack pointer. |
|
||||||
|
| 0x0B | BPR | Stack base pointer. |
|
||||||
|
| 0x1C | RET | Return address register. |
|
||||||
|
| 0x1D | IDR | Interrupt descriptor register. Contains a pointer to the interrupt descriptor table.|
|
||||||
|
| 0x11\dots 0x1F | RESERVED | Reserved registers.
|
||||||
|
|
||||||
|
## STS --- Status Register
|
||||||
|
The status register stores the flags from calculations and comparisons. It is a register of 32 bits, with the following layout:
|
||||||
|
| Bit | Name | Description | Boot Value |
|
||||||
|
|--------|--------------------|-----------------------------------------------------------------------------------------------|------------|
|
||||||
|
| 0 | Equal | Set if the result of the last comparison was equal. | 0 |
|
||||||
|
| 1 | GreaterThan | Set if the result of the last comparison was greater than. | 0 |
|
||||||
|
| 2 | GreaterThanOrEqual | Set if the result of the last comparison was greater than or equal. | 0 |
|
||||||
|
| 3 | LessThan | Set if the result of the last comparison was less than. | 0 |
|
||||||
|
| 4 | LessThanOrEqual | Set if the result of the last comparison was less than or equal. | 0 |
|
||||||
|
| 5 | Zero | Set if the result of the last arithmetic / logic operation was equal to zero | 0 |
|
||||||
Reference in New Issue
Block a user