The system features five unsigned 16-bit registers. A and B are for general artithmetic operations while X and Y are for incrementing.
The instruction width is 32-bit with each instruction being comprised of an 8-bit operator and sub-operator followed by a 16-bit operand.
The operator and sub-operator combine in logical ways to form super-operators that can perform complex operations in a single instruction cycle
operator | description |
---|---|
0x00 - Halt | Immediately halts system |
0x01 - Print register to console | Prints register name and contents to console |
0x02 - Print value to console | Prints register contents as numerical value to console |
0x03 - Print character to console | Prints value as 16-bit unicode character |
0x0A - Jump if flag | Jump to specified program line if condition is met |
0x0B - Jump if no flag | Jump to specified program line if condition is not met |
0x40 - Load A Register | Loads specified value to A register |
0x41 - Store A register | Stores A reigster value to specified location |
0x42 - Add to A register | Adds specified value to A register |
0x43 - Subtract from A register | Subtract specified value from A register |
0x45 - A register multipled by | Multiples A register by specified value |
0x47 - A register divided by | Divides A register by specified value |
0x49 - Remainder of A register divided by | Divides A register by specified value and returns remainder |
0x4A - Flag is A register equal to | Set flag if A register value is equal to specified value |
0x4B - Flag is A register more than | Set flag if A register value is more than specified value |
0x4C - Flag is A register less than | Set flag if A register value is less than specified value |
0x51 - Store B register | Stores B reigster value to specified location |
0x52 - Add to B register | Adds specified value to B register |
0x53 - Subtract from B register | Subtract specified value from B register |
0x55 - B register multipled by | Multiples B register by specified value |
0x57 - B register divided by | Divides B register by specified value |
0x59 - Remainder of B register divided by | Divides B register by specified value and returns remainder |
0x5A - Flag is B register equal to | Set flag if B register value is equal to specified value |
0x5B - Flag is B register more than | Set flag if B register value is more than specified value |
0x5C - Flag is B register less than | Set flag if B register value is less than specified value |
0x60 - Store result | Store result from accumulator to specified location |
0x61 - Add A and B registers | Adds A and B registers and outputs to specified location |
0x62 - Multiplies A and B registers | Multiplies A and B registers and outputs to specified location |
0x63 - A register minus B register | Subtracts B register from A register and outputs to specified location |
0x64 - B register minus A register | Subtracts A register from B register and outputs to specified location |
0x65 - A divided by B | Divides A register by B register and outputs to specified location |
0x66 - B divided by A | Divides B register by A register and outputs to specified location |
0x67 - Remainder of A divided by B | Divides A register by B register and outputs remainder to specified location |
0x68 - Remainder of B divided by A | Divides A register by B register and outputs remainder to specified location |
0x70 - Load X register | Load specifed value to X register |
0x71 - Store X register | Store X register value to specified location |
0x72 - Increment X | Increment X register by specified value |
0x73 - Decrement X | Decrement X register by specified value |
0x7A - Flag if X equal to | Flag if X register value is equal to |
0x7B - Flag if X more than | Flag if X register value is more than |
0x7C - Flag if X less than | Flag if X register value is less than |
0x80 - Load Y register | Load specifed value to Y register |
0x81 - Store Y register | Store Y register value to specified location |
0x82 - Increment Y | Increment Y register by specified value |
0x83 - Decrement Y | Decrement Y register by specified value |
0x8A - Flag if Y equal to | Flag if Y register value is equal to |
0x8B - Flag if Y more than | Flag if Y register value is more than |
0x8C - Flag if Y less than | Flag if Y register value is less than |
0x90 - Push | Push value to stack |
0x91 - Pop | Pop value from stack |
Sub-operator | Description |
x00 - Minimum | Represents the minimum possible value |
x01 - Maximum | Represents the maximum possible value |
x02 - A register | Arbitrary value |
x04 - A register | 16-bit A register |
x05 - B register | 16-bit B register |
x06 - Accumulator | Accumulator stores values of arithmetic operations |
x07 - X register | 16-bit X register |
x08 - Y register | 16-bit Y register |
x09 - Stack | 16-bit stack |
x0A - Code RAM | Stores program currently being executed |
x0B - Work RAM | Stores values related to program being executed |