HPC167064 CPU
The HPC167064 CPU has a
Arithmetic Logic Unit (ALU)
The ALU is 16 bits wide and can do
Accumulator (A) Register
The
Address (B and X) Registers
The
Boundary (K) Register
The
Stack Pointer (SP) Register
The
Program (PC) Register
The
Addressing Modes
ADDRESSING MODES—ACCUMULATOR AS DESTINATION
Register Indirect
This is the ‘‘normal’’ mode of addressing for the HPC167064 (instructions are
Direct
The instruction contains an
Indirect
The instruction contains an
Indexed
The instruction contains an
Immediate
The instruction contains an
Register Indirect (Auto Increment and Decrement)
The operand is the memory addressed by the X register. This mode automatically increments or decrements the X register (by 1 for bytes and by 2 for words).
Register Indirect (Auto Increment and Decrement) with Conditional Skip
The operand is the memory addressed by the B register. This mode automatically increments or decrements the B register (by 1 for bytes and by 2 for words). The B register is then compared with the K register. A skip condition is gener- ated if B goes past K.
ADDRESSING MODES—DIRECT MEMORY AS DESTINATION
Direct Memory to Direct Memory
The instruction contains two 8- or
Immediate to Direct Memory
The instruction contains an 8- or
Double Register Indirect Using the B and X Registers Used only with Reset, Set and IF bit instructions; a specific bit within the 64 kbyte address range is addressed using the B and X registers. The address of a byte of memory is formed by adding the contents of the B register to the most significant 13 bits of the X register. The specific bit to be modified or tested within the byte of memory is selected using the least significant 3 bits of register X.
HPC Instruction Set Description
Mnemonic | Description | Action |
ARITHMETIC INSTRUCTIONS |
| |
ADD | Add | MAaMemIxMA carryxC |
ADC | Add with carry | MAaMemIaCMA carryxC |
ADDS | Add short imm8 | Aaimm8xA carryxC |
DADC | Decimal add with carry | MAaMemIaCxMA (Decimal) carryxC |
SUBC | Subtract with carry | MAbMemIaCxMA carryxC |
DSUBC | Decimal subtract w/carry | MAbMemIaCxMA (Decimal) carryxC |
MULT | Multiply (unsigned) | MA*MemIxMA & X, 0xK, 0xC |
DIV | Divide (unsigned) | MA/MemIxMA, remxX, 0xK, 0xC |
DIVD | Divide Double Word (unsigned) | X & MA/MemIxMA, remxX, 0xK, carryxC |
IFEQ | If equal | Compare MA & MemI, Do next if equal |
IFGT | If greater than | Compare MA & MemI, Do next if MA l MemI |
AND | Logical AND | MA and MemIxMA |
OR | Logical OR | MA or MemIxMA |
XOR | Logical | MA xor MemIxMA |
MEMORY MODIFY INSTRUCTIONS |
| |
INC | Increment | Mem a 1xMem |
DECSZ | Decrement, skip if 0 | Mem b1xMem, Skip next if Mem e 0 |
28