mirror of
				https://github.com/simon987/Much-Assembly-Required.git
				synced 2025-11-04 10:06:54 +00:00 
			
		
		
		
	
						
							Page:
							(Hardware) Universal Com Port
						
						
					
					
							Pages
							
							
								(Hardware) Battery
							
								(Hardware) Clock
							
								(Hardware) Construction Arm
							
								(Hardware) Core
							
								(Hardware) Drill
							
								(Hardware) Floppy Drive
							
								(Hardware) Hologram Projector
							
								(Hardware) Inventory
							
								(Hardware) Keyboard
							
								(Hardware) Laser
							
								(Hardware) Legs
							
								(Hardware) LiDAR
							
								(Hardware) Radio Receiver
							
								(Hardware) Random Number Generator
							
								(Hardware) Universal Com Port
							
								(Installation) Arch Linux
							
								(Installation) Windows
							
								(Snippet) Constants
							
								(Snippet) Dump memory to disk
							
								(Snippet) Keyboard controlled robot
							
								(Snippet) Manhattan distance
							
								(Snippet) Move in a random direction
							
								Assembler directives
							
								Assembly program examples
							
								Basic Assembly tutorial
							
								Biomass
							
								Blueprint
							
								CPU
							
								Collaboration Guide
							
								Day Night Cycle and solar Energy
							
								Debugging
							
								Game Universe
							
								Hacked NPC
							
								Hardware
							
								Home (old)
							
								Home
							
								Instruction Encoding
							
								Instruction Set
							
								Items
							
								Learn by Examples
							
								NPC Factory
							
								Non Player Character (NPC)
							
								Project structure
							
								Radio Tower
							
								Random Access Memory
							
								Road Map
							
								The Cubot Manuals
							
								The Game Universe
							
								Useful Code Snippets
							
								Users' Repositories
							
								World
							
						
					 Clone
	
					0 
					
				
						(Hardware) Universal Com Port
						
				
							
							Kevin Ramharak edited this page 2020-08-03 10:14:40 +02:00 
						
					Table of Contents
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.