Module io

Module io 

Source
Expand description

This module simulates the CPU behaviours which relate to I/O devices (connect/disconnect, the ways the IOS and TSD instructions with devices).

§Report Word

The Report word of I/O units looks like this:

Special - Mag tapeSequence NumberFlagAvailMaintConnectedEIAMISINDMode
3.7-4.93.1-3.62.92.82.72.62.52.41.1-2.3
(12 bits)(6 bits)(1 bit)(1 bit)(1 bit )(1 bit)(1 bit)(1 bit)(12 bits)

§Sequence Number Assignments

0: Sequence which is run to start the computer (e.g. when “CODABO” or “START OVER” is pressed).

41: Handles various I/O alarm conditions. 42: Handles various trap conditions (see Users Handbook page 42). 47: Handles miscellaneous inputs 50: DATRAC (A/D converter) 51: Xerox printer 52: PETR (paper tape reader) 54: Interval timer 55: Light pen 60: Oscilloscope display 61: RNG 63: Punch 65: Lincoln Writer input 66: Lincoln Writer output 71: Lincoln Writer input 72: Lincoln Writer output 75: Misc output 76: Not for physical devices. 77: Not for physical devices.

§Attached Units

An “attached” unit is a unit which is actually present in the emulation (i.e. implemented in the code and the emulator has set it up).

§Connected Units

A “connected” unit is a unit which is attached and which the program has performed an action which puts it in the “connected” state as understood byt he TX-2.

On the “real” TX-2, each unit had a C flip-flop (Users Handbook section 4-2.3) to indicate whether it was connected. To connect a unit on the TX-2, it is necessary to execute an IOSₖ 3XXXX instruction (which connects unit k and sets its mode to XXXX).

See section 4-3.5 (THE IOS OPERATION - “INOUT SELECT”) of the Users Handbook.

Modules§

dev_lincoln_writer 🔒
Lincoln Writer, units 65, 71 (input), 66, 72 (output).
dev_petr 🔒
Photoelectric Paper tape reader, unit 52
pollq 🔒

Structs§

AttachedUnit
A unit which is known to the emulator (whether or not it is in “connected” mode).
DeviceManager
Manages a collection of devices. Does not actually correspond to a tangible physical component of the TX-2 system.
ExtendedConnectedUnitStatus
Status information for a unit which is actually connected.
ExtendedUnitState
The state of a unit (hardware belonging to a sequence).
UnitStatus
Units report their status (which is used to construct their report word) with this struct.

Enums§

InputFlagRaised
Indicates whether or not a unit’s input flag is raised.
TransferFailed
Indicates an unsuccessful I/O.
UnitType

Constants§

IO_MASK_AVAIL 🔒
When set, indicates that the unit’s buffer is available for use (read or write) by the CPU.
IO_MASK_CONNECTED 🔒
When set, indicates the unit is (already) connected.
IO_MASK_FLAG 🔒
When set, indicates that the unit wants attention. That is, is ready for a TSD instruction or has just been connected.
IO_MASK_MAINT 🔒
When set, indicates that the unit is in maintenance mode (i.e. is not available)
IO_MASK_MISIND 🔒
When set, indicates that the controlling sequence has missed a data item.

Traits§

Unit

Functions§

make_report_word_for_invalid_unit 🔒
make_unit_report_word 🔒
set_up_peripherals