Memory access instructions are concerned with loading data to registers and storing data in memory.
The Memory Access Instructions are...
Instruction | Encoding | Primary Operand | Secondary Operand |
---|---|---|---|
Load | L | Register | Register |
Load Immediate | I | Register | Number |
Store | S | Register | Register |
Copy | C | Register | Register |
The Load instruction will copy a number of bytes to the primary operand starting at the address specified by contents of the secondary operand.
The number of bytes copied to the primary operand will be determined by the size of the data type specifier given with the instruction.
The secondary operand register is expected to contain a memory address value of the @
data type format.
The contents of the primary operand register are overwritten with this instruction.
The Load Immediate instruction will set the contents of the primary operand register to that of a constant value encoded in the instruction.
This constant value can be one of...
The contents of the primary operand register are overwritten with this instruction.
The Store instruction will copy a number of bytes from the secondary operand register to a series of bytes in memory beginning at the address specified by the contents of the primary operand register.
The number of bytes copied from the secondary operand register will be determined by the size of the data type specifier given with the instruction.
The primary operand register is expected to contain a memory address value of the @
data type format.
The Copy instruction will copy the contents of the secondary operand register to the primary operand register.
The contents of the primary operand register are overwritten with this instruction.
Arithmetic instructions performed using signed word data types expect the format of those types to be two's complement.
The Arithmetic Instructions are...
Instruction | Encoding | Primary Operand | Secondary Operand |
---|---|---|---|
Adddition | + | Register (Addend) | Register (Addend) |
Subtraction | Register (Minuend) | Register (Subtrahend) | |
Multiplication | * | Register (Multiplier) | Register (Multiplicand) |
Quotient | / | Register (Dividend) | Register (Divisor) |
Remainder | % | Register (Dividend) | Register (Divisor) |
The Addition instruction performs binary addition on the contents of the primary and secondary operand registers.
The primary operand register is overwritten with the result of the addition.
The Subtraction instruction performs binary subtraction on the contents of the primary and secondary operand registers.
The contents of the secondary operand register are subtracted from the contents of the primary operand register.
The primary operand register is overwritten with the result of the subtraction.
The Multiplication instruction performs binary multiplication on the contents of the primary and secondary operand registers.
The contents of the primary operand register are multiplied by the contents of the secondary operand register.
The primary operand register is overwritten with the result of the multiplication.
The Quotient instruction performs binary division on the contents of the primary and secondary operand registers.
The contents of the primary operand register are divided by the contents of the secondary register.
The primary operand register is overwritten with the quotient result of the division.
The Remainder instruction performs binary division on the contents of the primary and secondary operand registers.
The contents of the primary operand register are divided by the contents of the secondary register.
The primary operand register is overwritten with the remainder result of the division.
The Remainder instruction is not supported for any floating point data types. If the Remainder instruction is provided a floating point data type, it shall be interpreted as the No Operation instruction.
The Binary Logic instructions are...
Instruction | Encoding | Primary Operand | Secondary Operand |
---|---|---|---|
AND | & | Register | Register |
OR | | | Register | Register |
XOR | ^ | Register | Register |
NOT | ! | Register | - |
The AND instruction performs a binary logical AND on the contents of the primary and secondary operand registers.
The primary operand register is overwritten with the result of this instruction.
The OR instruction performs a binary logical OR on the contents of the primary and secondary operand registers.
The primary operand register is overwritten with the result of this instruction.
The XOR instruction performs a binary logical XOR on the contents of the primary and secondary operand registers.
The primary operand register is overwritten with the result of this instruction.
The NOT instruction performs a binary logical NOT on the contents of the primary register.
The primary operand register is overwritten with the result of this instruction.
The Conditional Execution instructions are...
Instruction | Encoding | Primary Operand | Secondary Operand |
---|---|---|---|
If Greater or Equal | g | Register | Register |
If Greater | > | Register | Register |
If Less or Equal | l | Register | Register |
If Less | < | Register | Register |
If Equal | = | Register | Register |
If Not Equal | _ | Register | Register |
Conditional execution instructions will perform a comparison on two register values, and execute the next instruction if the comparison is true. If the comparison is false, the next instruction will be skipped.
Conditional Execution instructions do not change the contents of their register operands.
The If Greater or Equal instruction will execute the next instruction if the contents of the primary operand register are greater or equal to the contents of the secondary operand register.
The If Greater instruction will execute the next instruction if the contents of the primary operand register are greater than the contents of the secondary operand register.
The If Less or Equal instruction will execute the next instruction if the contents of the primary operand register are less than or equal to the contents of the secondar operand register.
The If Less instruction will execute the next instruction if the contents of the primary operand register are less than the contents of the secondary operand register.
The If Equal instruction will execute the next instruction if the contents of the primary operand register are equal to the contents of the secondary operand register.
The If Not Equal instruction will execute the next instruction if the contents of the primary operand register are not equal to the contents of the secondary operand register.
The Bit Manipulation Instructions are...
Instruction | Encoding | Primary Operand | Secondary Operand |
---|---|---|---|
Logical Shift Left | O | Register | Register |
Logical Shift Right | o | Register | Register |
Arithmetic Shift Right | A | Register | Register |
Rotate Bits Left | R | Regiseter | Register |
Rotate Bits Right | r | Register | Register |
All bit manipulation instructions will move a number of bits in a register determined by the word data type specifier.
The number of places that bits are moved is determined by the number represented by the least significant byte in the secondary operand register. The contents of the secondary operator register are always assumed to be an Unsigned Byte word data type.
The word data type specifier establishes a boundary with a width of a number of bits equal to the bit size of the specified data type. Bits are then moved in and out of this boundary.
For every bit moved out of a boundary, a new bit must be moved into the boundary on the opposite side from the bit which was moved out. The value of bits being moved into the boundary are determined by the individual instruction being used.
The Logical Shift Left instruction will shift bits towards higher significant place values.
If a bit is already at the highest place value, it is moved out of the boundary.
As bits are shifted out of the highest place value, new zero bits are moved into the lowest place value.
The Logical Shift Right instruction will shift bits towards lower significant place values.
If a bit is already at the lowest place value, it is moved out of the boundary.
As bits are shifted out of the lowest place value, new zero-bits are moved into the highest place value.
The Arithmetic Shift Right instruction will shift bits towards lower significant place values.
If a bit is already at the lowest place value, it is moved out of the boundary.
As bits are shifted out of the lowest place value, new one-bits are moved into the highest place value.
The Rotate Left instruction will shift bits towards higher significant place values.
If a bit is already at the highest place value, it is moved to the lowest place value when shifted.
The Rotate Right instruction will shift bits towards lower significant place values.
If a bit is already at the lowest place value, it is moved to the highest place value when shifted.
The Conversion Instructions are...
Instruction | Encoding | Primary Operand | Secondary Operand |
---|---|---|---|
Sign Extend | x | Register | Word Data Type |
Zero Extend | z | Register | Word Data Type |
Absolute Value | a | Register | - |
Negate | n | Register | - |
Convert to Large Floating Point | F | Register | - |
Convert to Small Floating Point | f | Register | - |
Convert from Large Floating Point | U | Register | - |
Convert from Small Floating Point | u | Register | - |
All Conversion instructions will overwrite the contents of the primary operand register.
The Word Data Type required for the secondary operand in the Sign Extend and Zero Extend instructions is an encoded word data type.
The Sign Extend instruction will onvert a signed vinary value of a size given by the word data type specifier to a signed binary value of a size corresponding to the size of the data type specified by the secondary operand.
The Sign Extend instruction expects the contents of the primary operand register to be a two's complement binary format.
The Zero Extend instruction will convert an unsigned binary value of a size given by the word data type specifier to an unsigned binary value of a size corresponding to the size of the data type specified by the secondary operand.
The Zero Extend instruction expects the contents of the primary operand register to be an unsigned binary format.
The Absolute Value instruction will convert a signed integer representation to a unsigned integer.
This instruction expects the contents of the primary operand register to be a two's complement binary format.
The Sign instruction will convert an unsigned integer value to its corresponding two's complement representation.
Due to the precision limitations of two's complement binary representation, the value of the most significant bit will not be included in the value conversion. For any unsigned data type with n bits of precision, the Sign instruction is only capable of converting values represented with 2n-1 bits.
This instruction will convert a value of a type specified by the word data type specifier to a Large Floating Point data type.
This instruction expects that the primary operand register does not already contain a Large Floating Point value.
This instruction will convert a value of a type specified by the word data type specifier to a Small Floating Point data type.
This instruction expects that the primary operand register does not already contain a Small Floating Point value.
This instruction will convert a Large Floating Point value to another data type determined by the word data type specifier.
This instruction expects that the primary operand register contains a Large Floating Point value.
The floating point value is truncated such that the resulting data type contains the value originally held in the significand of the floating point.
This instruction will convert a Small Floating Point value to another data type determined by the word data type specifier.
This instruction expects that the primary operand register contains a Small Floating Point value.
The floating point value is truncated such that the resulting data type contains the value originally held in the significand of the floating point.
The Special instructions are...
Instruction | Encoding | Primary Operand |
---|---|---|
Unconditional Jump | @ | Register |
System Call | y | Multiple Registers |
The Unconditional Jump instruction will set the address held in the Instruction special purpose register to the address held in the primary operand register.
The primary operand register is assumed to contain a memory address.
The System Call instruction is provided with a number of registers.
The number, ordering, and contents of the registers are dependent on the underlying system's system call implementation.