Updated The Cubot Manuals (markdown)

Arthur Paulino 2018-01-03 13:35:27 -03:00
parent 00cc836a3c
commit 2ca46ecfc9

@ -2,30 +2,7 @@
An image showing the Cubot's parts (CPU, registers and hardware) followed by brief descriptions. An image showing the Cubot's parts (CPU, registers and hardware) followed by brief descriptions.
# Hardware # [Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware)
The Cubot's microprocessor can handle up to 65535 hardware devices connected to addresses 0x0000-0xFFFF. Hardware devices can interact with the CPU, its memory and its registers.
The **HWQ** (Hardware Query) instruction can be used to get information about the hardware connected at an address.
Exemple:
```assembly
MOV A, 0x0005
HWQ A
; The hardware id of the hardware at address 0x0005 is stored in the B register
; If there is no hardware device connected at this address, B = 0
```
The **HWI** (Hardware Interupt) instruction sends an interrupt to the hardware device at the specified address
```assembly
INVENTORY_HW equ 0x0006 ; An inventory module is connected at address 0x006
MOV A, 1 ; The Inventory hardware expects 1 (POLL) or 2 (CLEAR)
HWI INVENTORY_HW
; B = current held item id
```
## Hardware Devices
- [Hologram Projector](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Hologram-Projector) - [Hologram Projector](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Hologram-Projector)
- [Drill](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Drill) - [Drill](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Drill)
- [Inventory](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Inventory) - [Inventory](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Inventory)
@ -40,14 +17,7 @@ HWI INVENTORY_HW
- [Universal Com Port](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Universal-Com-Port) - [Universal Com Port](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Universal-Com-Port)
- [Radio Receiver](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Radio-Receiver) - [Radio Receiver](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Radio-Receiver)
# The MAR-CPU # [CPU](https://github.com/simon987/Much-Assembly-Required/wiki/CPU)
Even more detailed information, always with examples that can be tested within the game itself, so the user can see the effect of whats being taught on the behavior of his Cubot. - [Instruction Set](https://github.com/simon987/Much-Assembly-Required/wiki/Instruction-set)
- [Assembler directives](https://github.com/simon987/Much-Assembly-Required/wiki/Assembler-directives)
## Binary and Hexadecimal Representation
## The Assembly Language
## *Tick* mechanics
# Useful code snippets