Architecture: Device bus
The device bus provides multiplexed communications between the processor and up to sixteen connected devices.
Device ports
The device bus contains 256 device ports. A device connects to the device bus via a contiguous group of 16 device ports.
Each device port is uniquely identified by an 8-bit port number. The value of the upper four bits of a port number uniquely identifies the connected device. The value of the lower four bits of a port number is used by the device to determine the behaviour of that port.
Requests
Communications are initiated by the device bus, and devices act as passive request handlers. There are two types of request, a read request and a write request.
Read request.
A read request will send no value to a device port, and will receive a byte in response. A read request sent to a disconnected device port will be discarded and will return immediately with a value of 0x00
.
Write request
A write request will send a byte to a device port, and will receive an empty response. A write request sent to a disconnected device port will be discarded and will return immediately with no value.
Operations
The device bus supports two operations, read and write.
Read
Reading a byte from the device bus will send a read request to the device port referenced by the given port number, then the device associated with that port will process the read request according to the specification of that device, and then the device will respond with the byte to be returned. This operation has no maximum duration.
Reading a double from the device bus will read the high byte of the double from the given port number, and the low byte of the double from the port number directly following that port number. The behaviour when a double is read from the highest port number is implementation defined.
Write
Writing a byte to the device bus will send a write request containing the given byte to the device port referenced by the given port number, then the device associated with that port will process the write request according to the specification of that device, and then the device will respond with no value. This operation has no maximum duration.
Writing a double to the device bus will write the high byte of the double to the given port number, and the low byte of the double to the port number directly following that port number. The behaviour when a double is written to the highest port number is implementation defined.