Crate base

Crate base 

Source
Expand description

The base crate defines the TX2-related things which are useful in both a simulator and other associated tools. The idea is that if you want to write an assembler, it would depend on the base crate but would not need to depend on the simulator library itself.

Modules§

bitselect
charset
Character set conversions.
collections
error
Basic error reporting.
instruction
Binary and symbolic representations of TX-2 instructions.
onescomplement 🔒
This module implements one’s complement fixed-width signed types for use in emulating the TX-2, plus related unsigned types of the same width.
prelude
The prelude exports a number of structs which are useful in representing things to do with the TX-2. Providing this prelude is the main purpose of the base crate.
quarters
Code for identifying quarters and bits of TX-2 words using the notations from the TX-2 documentation.
splay
Splay/unsplay 36-bit words.
subword
Various convenience utilities for splitting 36-bit TX-2 words into smaller components and for joining them together.
types 🔒

Macros§

u5
u6
u9
u18
u36

Structs§

Unsigned5Bit
Unsigned5Bit is used as a system configuration value; that is, an index into F-memory.
Unsigned6Bit
Unsigned6Bit is used as an X-register address. That is, the j in Xj.
Unsigned9Bit
Unsigned9Bit is the value of a “quarter” of the 36-bit TX-2 machine word. A number of instructions - and in particular the Exchange Unit - work on the quarters of a word.
Unsigned12Bit
Unsigned12Bit is used as the mode of a connected I/O device.
Unsigned18Bit
Unsigned18Bit is the value of a “half” of the 36-bit TX-2 machine word. We use this type to hold STUV-memory addresses, among other things. Physical memory addresses though are only 17 bits wide. The remaining bit can be used to “mark” an address either for tracing (when it’s an instruction address) or for deferred addressing (when it’s an operand address).
Unsigned36Bit
Unsigned36Bit is the basic machine word of the TX-2. This is the width of the registers in the Arithmetic Unit, and it is the unit on which the Exchange Unit operates when performing memory fetches or stores. This is also the width of all instructions.