From e00a15e2c2b287f626c0211ca68053b64f178f68 Mon Sep 17 00:00:00 2001 From: Arthur Paulino Date: Wed, 3 Jan 2018 10:51:24 -0300 Subject: [PATCH] adding hardware devices --- The-Cubot-Manuals.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/The-Cubot-Manuals.md b/The-Cubot-Manuals.md index cf60fe3..35306ae 100644 --- a/The-Cubot-Manuals.md +++ b/The-Cubot-Manuals.md @@ -2,9 +2,43 @@ An image showing the Cubot's parts (CPU, registers and hardware) followed by brief descriptions. -# Hardware Specifications +# Hardware -Details about the hardware with minimal code examples on how to use them. +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. Define a constant +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) +- [Drill](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Drill) +- [Inventory](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Inventory) +- [Laser](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Laser) +- [Legs](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Legs) +- [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-LiDAR) +- [Keyboard](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Keyboard) +- [Battery](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Battery) +- [Random number generator](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Random-Number-Generator) +- [Clock](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Clock) +- [Floppy Drive](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Floppy-Drive) +- [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) # The MAR-CPU