I/O instructions

Like the IN and OUT instructions found on Z80 or 808x processors the IBM 5110 has instructions to communicate with peripheral devices (e.g. the keyboard or the disk drive). And it is the only way of doing I/O as the device adapters cannot be mapped into the address space. The IN/OUT instructions use port numbers for addressing, the IBM computer instead needs one of 16 device addresses . I/O transfers are always done bytewise whereas RWS or ROS can have word transfers.

The page bus transfers explained the signals involved into transmission of data on the bus this page explains the machine instructions that do I/O.

Device status

Each device has a status byte that can be read by requesting it with the Opcode E signal. To do this there is a special instruction that transfers the status into a register: STAT Rx, i

STAT R1, $4   reads status byte from the keyboard into R1
STAT R2, $D   reads Diskette Sense Byte from the disk adapter into R2
Some devices may have additional status bytes that are accessed on a device specific way.

Reading a data byte

The instruction to read a data byte is GETB which can have register direct or register indirect with postcrement addressing modes for the destination.

GETB R12, $E    reads a data byte from the tape drive

LWI R1, #$2000
GETB (R1)+, $D  reads a data byte from the disk drive into $2000 and increments
                R1 by 1

Writing a data byte

Like GETB the instruction to write a data byte is called PUTB but the register direct addressing is missing here.

LWI R2, #$304F
PUTB $5, (R2)--   sends the contents of $304F to the printer and decrements
                  R2 by 2
There is a little trick to send a byte from any register without having to store the contents to RWS first:
LBI R4, #'C'
LWI R5, #$0009    RWS address of the low byte of register R4
PUTB $5, (R5)     sends character 'C' to the printer