pub trait Inst {
// Required methods
fn is_held(&self) -> bool;
fn configuration(&self) -> Unsigned5Bit;
fn index_address(&self) -> Unsigned6Bit;
fn opcode_number(&self) -> u8;
fn is_deferred_addressing(&self) -> bool;
fn operand_address_and_defer_bit(&self) -> Unsigned18Bit;
fn operand_address(&self) -> OperandAddress;
}
Expand description
The Inst
trait provides a way to extract the various fields
within an instruction.
Required Methods§
Sourcefn configuration(&self) -> Unsigned5Bit
fn configuration(&self) -> Unsigned5Bit
Fetch the configuration field of the instruction. This is used as an index to fetch a system configuration from the F-memory. Table 7-2 in the TX-2 User Handbook explains what data exists in the F-memory in the standard configuration.
The meaning of the values fetched from the F-memory (and thus, the significance of the configuration values of an instruction) is explained in Volume 2 (pages 12-19) of the Technical manual. Some instructions (JMP, for example) use this field differently.
Sourcefn index_address(&self) -> Unsigned6Bit
fn index_address(&self) -> Unsigned6Bit
indexation is actually a signed operation (see the IndexBy
trait) but index addresses are shown as positive numbers
(e.g. 77) in assembler source code.
Sourcefn opcode_number(&self) -> u8
fn opcode_number(&self) -> u8
The opcode of the instruction.
Sourcefn is_deferred_addressing(&self) -> bool
fn is_deferred_addressing(&self) -> bool
The value of the defer bit from the operand address field.
Sourcefn operand_address_and_defer_bit(&self) -> Unsigned18Bit
fn operand_address_and_defer_bit(&self) -> Unsigned18Bit
Fetches the operand address with the defer bit (if set) in bit position 17.