0
(Hardware) Universal Com Port
Kevin Ramharak edited this page 2020-08-03 10:14:40 +02:00

The Universal Communication Port, or Com Port for short enables communication between machines and structures. This device is coupled to an internal message buffer, which can contain up to 40 messages. Each message is sequence of 8 words. The internal buffer is emptied into the console screen at the end of every tick.

Specifications

Manufacturer: Apachicorp
Version: 1.1c
Default address: 0x000D
Hardware ID: 0x000D

Interrupt Behavior

Value of A Action Energy cost Result
0 COMPORT_BUFFER_CLEAR 0 kJ Clears the internal message buffer.
1 COMPORT_POLL 4 kJ Copy all internal buffer messages to memory at X, sets B to the number of messages copied
2 COMPORT_FRONT_PORT_OUT 5 kJ Copies 8 words starting from the address in X to the object directly in front of the cubot if this object has a Universal Com Port as well. The B register is set if the operation succeeded, it is reset otherwise
3 COMPORT_SELF_OUT 1 kJ Copies 8 words starting from the address in X to the internal message buffer. The B register is set if the operation succeeded, it is reset otherwise
4 COMPORT_CONSOLE_CLEAR 0 kJ Clears the console.

Note that a Cubot can send a message to another Cubot's internal buffer, which will be emptied into his console screen.