Besides the "normal" use of the I/O operations for data transfers, these operations are also used to control special functions within the machine, e.g. the processor or the display adapter, or to set special flags. These functions are listed below. If a functions should only be valid either for the 5100 or for the 5110 it will be marked in the first column.
Remark | Bit | Description |
---|---|---|
5100 | 0 | 1=Reset Read Data Error |
5110 | 0 | 1=Load jumper information into World Trade Latch and selector |
1 | 0=Disable Interrupts | |
2 | 0=Enable Interrupts | |
3 | 0=Display off | |
5110 | 4 | 0=Display on |
5 | 0=Toggle RWS/ROS Level 0 | |
5110 | 6 | 0=Alarm on |
5110 | 7 | 0=Alarm off |
Remark | Bit | Description |
---|---|---|
0 | ||
1 | 0=Level 1 ROS; 1=Level 1 RWS | |
2 | 0=Level 2 ROS; 1=Level 2 RWS | |
3 | 0=Level 3 ROS; 1=Level 3 RWS | |
4 | ?? | |
5 | ||
6 | ||
7 |
The I/O operations perform the shift and rotate instructions of the processor.
Remark | Bit | Description |
---|---|---|
0 | 1=ROS write enable | |
1 | ||
2 | ||
3 | ||
5100 | 4 | 1=Select BASIC ROS/Common ROS |
5110 | 4 | 1=Select BASIC ROS |
5 | 1=Select APL ROS | |
5110 | 6 | 1=Select Common ROS |
7 |
To read out the selected ROS the desired address is sent to device 1 with two
consecutive PUTB instructions, first the high-byte of the address,
then the low byte.
ATTENTION: The address is the word address, not the byte address!
Then the word can be read with two GETB instructions. The second GETB will automatically increase the internal address counter by 1 so you don't have to reload the address when reading a contiguous area.
The current ROS address can be read back with two STAT instructions.
Bit 0 is very interesting: the ability to write to the ROS (or the writable substitute) was apparently used by the developers to test new versions of the non-executable ROS' without the need to burn dozens of EPROMs (we're in the time of 1702s or 2708s!) or create new mask ROMs.
only 5110
Remark | Bit | Description |
---|---|---|
0 | 0=I/O ROS | |
1 | 0=Interpreter ROS | |
2 | always 1 | |
3 | always 1 | |
4 | always 1 | |
5 | always 1 | |
6 | always 1 | |
7 | always 1 |
Since only one of the two executable ROS' (I/O routines, meta-interpreter)
can be active, this control instruction provides a means to switch
between these two. Note that the selection between APL or BASIC executable
ROS is done in hardware with the APL/BASIC switch on the front plate.
Obviously there needs to be a transfer subroutine in each of these ROS
modules since execution will transfer to the other ROS immediatley following
the control instruction.
Remark | Bit | Description |
---|---|---|
0 | 1=Area 0000-1FFF available | |
1 | 1=Area 2000-3FFF available | |
2 | 1=Area 4000-5FFF available | |
3 | 1=Area 6000-7FFF available | |
4 | 1=Area 8000-9FFF available | |
5 | 1=Area A000-BFFF available | |
6 | 1=Area C000-DFFF available | |
7 | 1=Area E000-FFFF available |
OpE gives you one of three status bytes, the selection is done by presetting the destination register (the values in brackets are for the 5110 model 1 APL/BASIC without Feature ROS):
$80 - Size of the I/O ROS [= $F0] $40 - Size of the meta-interpreter ROS [= $C0] $20 - (??) [= $80]Theoretically there may be gaps between the areas, but it seems that this doesn't occur in real systems.
Remark | Bit | Description |
---|---|---|
0 | ||
1 | 0=Reset interrupt 3 | |
2 | ||
5100 | 3 | 0=Keyboard lock; unused! |
4 | (Interrupt 2?) | |
5 | (Interrupt 2?) | |
6 | 0=Typamatic on; 1=Typamatic off | |
7 | 0=Enable interrupt 3; 1=disable interrupt 3 |
The keyboard offers a status byte and a scancode. The selection is done by presetting the destination register for the STAT instruction:
$80 - Read status $40 - Read scancode
This is the status byte read via an OpE instruction.
Remark | Bit | Description |
---|---|---|
0 | (always 0?) | |
1 | 0=APL; 1=BASIC (from the console switch) | |
2 | always 1 | |
3 | always 1 | |
5110 | 4 | Key Pending |
5 | always 1 | |
6 | always 1 | |
5110 | 7 | Katakana Enable (if available) |
Remark | Bit | Description |
---|---|---|
0 | 1=Start Write | |
1 | 1=Start Read | |
2 | 1=Diag 1 | |
3 | 1=Diag 2 | |
4 | 1=Erase gate on | |
5 | 1=Read/Write CRC | |
6 | 1=Write Address Mark | |
7 | 1=Reset Read/Write/Diag |
The mechanical operations of the disk drive can be controlled while in Access Mode of the controller. Following are the functions:
Remark | Bit | Description |
---|---|---|
0 | 1=Reset New Media Bit | |
1 | 1=MFM, 0=FM | |
2 | 1=Switch Filter | |
3 | 1=Inner Tracks | |
4 | 1=Engage Head | |
5 | 1=Side 1, 0=Side 0 | |
6 | Access Line 1 | |
7 | Access Line 2 |
During Reset Mode a PUT instruction transfers the desired subdevice address to the diskette controller to select one of the maximum four possible drives.
In Write Mode PUT instructions are used to transfer the data bytes to the diskette.
In Access Mode GET fetches the status byte of the disk drive, not of the diskette adapter (see OpE for this).
Remark | Bit | Description |
---|---|---|
0 | 1=New Media | |
1 | 1=MFM, 0=FM | |
2 | 1=Switch Filter | |
3 | 1=Inner Tracks | |
4 | Head Engage (1=Engaged) | |
5 | Head Selected (1=Side 1) | |
6 | Access Line 1 | |
7 | Access Line 2 |
OpE fetches the status of the diskette adapter.
Remark | Bit | Description |
---|---|---|
0 | 1=Write Mode | |
1 | 1=Read Mode | |
2 | 1=Diag 1 or 2 | |
3 | 1=Index Hole | |
4 | 1=Erase Gate Sense | |
5 | 1=Diskette 2, 0=Diskette 1 | |
6 | 1=CRC Error | |
7 | 1=R/W Overrun |
Remark | Bit | Bit=0 | Bit=1 |
---|---|---|---|
0 | Run | Stop | |
1 | Forward | Reverse | |
2 | Channel 1 | Channel 0 | |
3 | Write | Read | |
4 | Channel 0 erase | Not channel 0 erase | |
5 | Channel 1 erase | Not channel 1 erase | |
6 | Diagnostic mode | Not diagnostic mode | |
7 | Interrupt enabled | Interrupt disabled |
The following description comes from the IBM 5100 MIM page C-14, but it is also valid for the 5110.
Bemerkung | Bit | Bit=0 | Bit=1 |
---|---|---|---|
0 | |||
1 | |||
2 | Byte mode | Bit mode | |
3 | |||
4 | |||
5 | |||
6 | First transition | No action | |
7 | +Serial write data out | No action |
This returns the tape status byte, but you need to follow these steps:
CTRL $E, #$FF GETB R5, $E LBI R5, #$40 STAT R5, $E MOVE $8E, R5 ; Store status in 008F (see MIM page 3-34)
Remark | Bit | Description |
---|---|---|
0 | 1=End of tape (EOT) | |
1 | 1=No device address E response | |
2 | 1=Tape running | |
3 | 1=Cartridge in place | |
4 | 1=Erase on | |
5 | 1=LED and erase OK | |
6 | 1=File protected | |
7 | 0=Beginning of tape (BOT) |
Remark | Bit | Description |
---|---|---|
0 | 1=Reset Async. comm/Serial I/O | |
1 | 1=Reset tape adapter | |
2 | 1=Reset keyboard | |
3 | 1=Reset printer | |
4 | 1=Reset display adapter | |
5 | 1=Reset device address B (unused) | |
6 | 1=Reset device address C (unused) | |
7 | 1=Reset diskette adapter |