HPC Instruction Set Description (Continued)
Mnemonic | Description | Action |
BIT INSTRUCTIONS |
|
|
SBIT | Set bit | 1xMem.bit |
RBIT | Reset bit | 0xMem.bit |
IFBIT | If bit | If Mem.bit is true, do next instr. |
MEMORY TRANSFER INSTRUCTIONS |
| |
LD | Load | MemIxMA |
| Load, incr/decr X | Mem(X)xA, X g1 (or 2)xX |
ST | Store to Memory | AxMem |
X | Exchange | AÝMem |
| Exchange, incr/decr X | AÝMem(X), X g1 (or 2)xX |
PUSH | Push Memory to Stack | WxW(SP), SPa2xSP |
POP | Pop Stack to Memory | SPb2xSP, W(SP)xW |
LDS | Load A, incr/decr B, | Mem(B)xA, B g1 (or 2)xB, |
| Skip on condition | Skip next if B greater/less than K |
XS | Exchange, incr/decr B, | Mem(B)ÝA, Bg1 (or 2)xB, |
| Skip on condition | Skip next if B greater/less than K |
REGISTER LOAD IMMEDIATE INSTRUCTIONS |
| |
LD B | Load B immediate | immxB |
LD K | Load K immediate | immxK |
LD X | Load X immediate | immxX |
LD BK | Load B and K immediate | immxB, immxK |
ACCUMULATOR AND C INSTRUCTIONS |
| |
CLR A | Clear A | 0xA |
INC A | Increment A | A a 1xA |
DEC A | Decrement A | A b 1xA |
COMP A | Complement A | 1’s complement of AxA |
SWAP A | Swap nibbles of A | A[15:12] wA[11:8] wA[7:4] ÝA[3:0] |
RRC A | Rotate A right thru C | CxA15 x . . . xA0xC |
RLC A | Rotate A left thru C | CwA15 w . . . wA0wC |
SHR A | Shift A right | 0xA15x . . . xA0xC |
SHL A | Shift A left | CwA15w . . . wA0w0 |
SC | Set C | 1xC |
RC | Reset C | 0xC |
IFC | IF C | Do next if C e 1 |
IFNC | IF not C | Do next if C e 0 |
TRANSFER OF CONTROL INSTRUCTIONS |
| |
JSRP | Jump subroutine from table | PCxW(SP),SPa2xSP |
|
| W(tableÝ)xPC |
JSR | Jump subroutine relative | PCxW(SP),SPa2xSP,PCaÝxPC |
|
| (Ýis a1025 to b1023) |
JSRL | Jump subroutine long | PCxW(SP),SPa2xSP,PCaÝxPC |
JP | Jump relative short | PCaÝxPC(Ý is a32 to b31) |
JMP | Jump relative | PCaÝxPC(Ýis a257 to b255) |
JMPL | Jump relative long | PCaÝxPC |
JID | Jump indirect at PC a A | PCaAa1xPC |
JIDW |
| then Mem(PC)aPCxPC |
NOP | No Operation | PC a 1 xPC |
RET | Return | SPb2xSP,W(SP)xPC |
RETSK | Return then skip next | SPb2xSP,W(SP)xPC, & skip |
RETI | Return from interrupt | SPb2xSP,W(SP)xPC, interrupt |
Note: W is
MA is Accumulator A or direct memory
Mem is
MemI is
imm8 is
For details of memory usage by each instruction, see The HPC User’s Manual.
29