The I/O bus enables the Retroputer CPU to communicate with other devices attached to the system, including things like keyboards, storage devices, and more.

The I/O bus allows fifteen devices to be connected — each one has a specific function and can interrupt the CPU at any time in order to request servicing. Data is transferred on an eight-bit wide data bus.

There are three components to this system:

IRQ Service and IRQ Signal Lines

When a device needs serviced by the CPU, it will set the IRQ service line corresponding to the IRQ of the device, and then pulse the IRQ Signal line. This will cause the CPU to stop whatever it was doing and allow it to service the most important IRQ. Until the request is serviced, the device should continue to pulse the IRQ Signal line until the CPU responds to the request. Although there may be requests with higher priority, eventually the request should be serviced.

Device and Address-Select Lines

When the CPU needs to request data from a device, or the device wants to send data to the CPU, the device is selected using the device-select lines. Each device is allocated a set number of addresses, and these are selected using the address-select lines.

<aside> 💡 When using assembly language, the device number directly corresponds to the high nibble when using IN or OUT. For example, OUT $47, AL will send the contents of AL to the fifth device (index 04) using the device's internal address of 07.

</aside>

Data Lines

Data lines are used for the actual transmission of data between the CPU and devices. This bus is only eight-bits wide.

Command Line

There are only two commands that the I/O bus understands: