| Register Name | Uses |
|---|---|
sp |
stack_ptr |
x |
temp, arg(1) |
y |
temp, arg(2) |
z |
temp, arg(3) |
w |
temp, arg(4) |
v |
temp, retval |
a |
saved |
b |
saved |
| Usage Name | Description |
|---|---|
stack_ptr |
Register serves as the stack pointer. |
temp |
Register may be used to hold temporary values without restriction. |
arg(_) |
Register is used as the Nth argument to a subroutine. |
retval |
A subroutine's return value is passed in this register. |
saved |
A called subroutine must save the content of these registers before using them, but their values persist across subroutine calls. |
| Register | Register Name | Size | Description |
|---|---|---|---|
$PC |
Program Counter | 16-bits | Keeps track of the currently executing instruction. |
$RA |
Return Address | 16-bits | Saves the program counter for subroutine return. |
$TS |
Test Stack | 16-bits | Stores boolean values in a stack used by branch instructions. |
$CC |
Condition Codes | 16-bits | Stores carry and overflow flags. |
$GP |
Global Pointer | 16-bits | Points to a region of process memory reserved for global variables. |
$KR |
Kernel Return | 16-bits | Holds the value of the program counter during interrupts. |
$MP |
Multiplication Product | 32-bits | Holds the accumulating product during a multiplication. |
Extension modules are groups of instructions which add functionality to the processor. They allow the processor to be built up in stages, or can be omitted for a simpler processor.
Base
The minimal set of features needed for general computation.
[]
lb, lw, sb, sw, call, b, bt, bf, li, szi, lsr, lsl, asr, add, sub, and, or, xor, mov, addcy, subcy, tl, tge, tb, tae, tne, teq, callr, jr, seb, NONEXE0, ret, tov, tcy, clr.cy, set.cy,
Globals
Instructions related to the $GP global variable pointer register and gloal variables.
[base]
lgb, lgw, sgb, sgw, rd.gp, wr.gp, prsv.gp, rstr.gp,
Bit Tests
Instructions related to testing specific bits of a register or memory.
[base]
tbit, cbit, sbit, tbitm, cbitm, sbitm,
Debugging
Instructions which communicate with a debugger.
[base]
Immediates
Instructions contain embedded (immediate) values. Generally duplicates of instructions which operate on registers.
[base]
tli, tgei, tbi, taei, tnei, teqi, addi, andi, ori, xori, addicy, subicy, neg,
Interrupts
Instructions for handling and operating during hardware/software interrupts.
[base, stack]
kret, kcall, prsv.ts, rstr.ts, prsv.ra, rstr.ra, prsv.cc, rstr.cc, sleep,
Multiply
Instructions related to integer multiplication.
[base, stack]
mulstep, rd.mp.lo, rd.mp.hi, prsv.mp, rstr.mp,
Security
Instructions related to computer security.
[base]
vijt,
Stack
Instructions for manipulating the subroutine stack.
[base]
Test-stack Operations
Instructions for manipulating the test-stack ($TS).
[base]