-
Notifications
You must be signed in to change notification settings - Fork 0
CPU Registers
Registers are small memory in the cpu which is used to perform operations. There are 5 registers in this cpu.
They are:
- A (Accumulator register)
- X (X register)
- Y (Y register)
- Q (Register used for counting loop iterations)
- K (Register used to store captured keypress)
This register is used to accumulate the results of an arithmetic operations. It is also a general purpose register. The index of A register is 0x01 in the memory.
This register is used to store values for arithmetic operations. It is also a general purpose register. The index of X register is 0x02 in memory.
This register is also like the X register, using to store values for arithmetic operations. It is a general purpose register. It is also used for the interrupt which prints characters whose ASCII code is stored in the Y register. The index of the Y register is 0x03 in memory.
This register is used as a Loop counter to count how many iterations of the loop have passed. It can be used as a general purpose register. The index of the Q register is 0x04 in memory.
This register is used for storing ASCII codes of the keys which are captured from interrupts.It cannot be used as a general purpose register. You can only move data from it. The index of the K register is 0x05 in memory.