RealQ16s:Provisional register listing

From Maths
Jump to: navigation, search

These are the minimum required registers for the RealQ16s project - that is there may be more registers than this in an actual machine (depending on extensions) but these /must/ be present.

Contents

 [hide

Core registers

Core registers
RealQ16s
General purpose
A (16bit) Accumulator, ALU operand
B (16bit) Base register, pointers
C (16bit) Count register, offsets
D (16bit) Data, communications
Note: Each GP register has a L and H form, eg AL is the lower 8 bits of A
Programming registers
IP (16bit) Instruction pointer
SP (16bit) Stack pointer
BP (16bit) Stack frame pointer
STRIDE (4bit) For array access

These registers are required by all implementations of RealQ16s

  • General purpose - There are 8 bytes of general purpose registers.
    • There are 4 16 bit general purpose registers, A, B, C and D. Each of these is aliased to 2 8 bit registers, they are:
      • AL, AH, BL, BH, CL, CH, DL and DH. That is AL is the lower byte of A and AH the upper, same for the others.
    • To sum up the registers are as follows:
    A  AL8 bits   |   AH8 bits   | B  BL8 bits   |   BH8 bits   | C  CL8 bits   |   CH8 bits   | D  DL8 bits   |   DH8 bits  
  • Instruction pointer
    IP  8 bits   |   8 bits  
  • Stack registers
    • There are 2 stack registers, BP, which points to the base of the current stack frame and SP, which points to the head of the stack.
    BP  8 bits   |   8 bits   | SP  8 bits   |   8 bits  
  • Stride register
    STRIDE  4 bits   
RealQ16s core registers
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 (bit position)
Main registers
A }Accumulator
AL AH
B }Base
BL BH
C }Count
CL CH
D }Data
DL DH
Programming registers
IP Instruction pointer
SP Stack pointer
BP Frame (base) pointer
  STRIDE Counter increment