mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
fix links with :
parent
84c1fcd3c7
commit
b3e6263f89
@ -42,7 +42,7 @@ produces the same machine code as:
|
|||||||
MOV B, 0x0000
|
MOV B, 0x0000
|
||||||
HWI 0x0001
|
HWI 0x0001
|
||||||
```
|
```
|
||||||
but to make code more readable and easier to reason about it is encouraged to use constants. Check this [snippet](https://github.com/simon987/Much-Assembly-Required/wiki/Snippet:-Constants) of al sort's of useful constants.
|
but to make code more readable and easier to reason about it is encouraged to use constants. Check this [snippet](https://github.com/simon987/Much-Assembly-Required/wiki/(Snippet)-Constants) of al sort's of useful constants.
|
||||||
|
|
||||||
## Labels
|
## Labels
|
||||||
The label directive associates a label with the memory address of the instruction/directive that follows it. The syntax to use a label is this: `name_of_label: <instruction>`. Labels behave a bit like the `EQU` directive. They refer to a certain value. Only this time it is not a constant value but a memory address. This is useful for the `JMP` family instructions and the `DW` directive. See the following example:
|
The label directive associates a label with the memory address of the instruction/directive that follows it. The syntax to use a label is this: `name_of_label: <instruction>`. Labels behave a bit like the `EQU` directive. They refer to a certain value. Only this time it is not a constant value but a memory address. This is useful for the `JMP` family instructions and the `DW` directive. See the following example:
|
||||||
|
2
CPU.md
2
CPU.md
@ -5,7 +5,7 @@ After each tick, all [FLAGS](https://github.com/simon987/Much-Assembly-Required/
|
|||||||
|
|
||||||
*_about 960,000 instructions in game server (2.4 GHz, single core)_
|
*_about 960,000 instructions in game server (2.4 GHz, single core)_
|
||||||
|
|
||||||
_See also_: [Battery Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Battery)
|
_See also_: [Battery Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Battery)
|
||||||
|
|
||||||
## CPU Architecture
|
## CPU Architecture
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
The game universe is a grid of [Worlds](https://github.com/simon987/Much-Assembly-Required/wiki/World). There can be a maximum of 65,536x65,536 worlds (4,294,967,296 total). You can get the current World coordinates by looking at the top left corner of the game screen or by using the [LiDAR hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-LiDAR). When reaching the edge of the game universe, the player will warp around it.
|
The game universe is a grid of [Worlds](https://github.com/simon987/Much-Assembly-Required/wiki/World). There can be a maximum of 65,536x65,536 worlds (4,294,967,296 total). You can get the current World coordinates by looking at the top left corner of the game screen or by using the [LiDAR hardware](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-LiDAR). When reaching the edge of the game universe, the player will warp around it.
|
26
Hardware.md
26
Hardware.md
@ -22,19 +22,19 @@ HWI INVENTORY_HW
|
|||||||
|
|
||||||
| Device | Default Address |
|
| Device | Default Address |
|
||||||
| -------- | ------- |
|
| -------- | ------- |
|
||||||
| [Legs](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Legs) | `0x0001` |
|
| [Legs](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Legs) | `0x0001` |
|
||||||
| [Laser](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Laser) | `0x0002` |
|
| [Laser](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Laser) | `0x0002` |
|
||||||
| [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-LiDAR) | `0x0003` |
|
| [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-LiDAR) | `0x0003` |
|
||||||
| [Keyboard](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Keyboard) | `0x0004` |
|
| [Keyboard](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Keyboard) | `0x0004` |
|
||||||
| [Drill](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Drill) | `0x0005` |
|
| [Drill](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Drill) | `0x0005` |
|
||||||
| [Inventory](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Inventory) | `0x0006` |
|
| [Inventory](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Inventory) | `0x0006` |
|
||||||
| [Random number generator](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Random-Number-Generator) | `0x0007` |
|
| [Random number generator](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Random-Number-Generator) | `0x0007` |
|
||||||
| [Clock](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Clock) | `0x0008` |
|
| [Clock](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Clock) | `0x0008` |
|
||||||
| [Hologram Projector](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Hologram-Projector) | `0x0009` |
|
| [Hologram Projector](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Hologram-Projector) | `0x0009` |
|
||||||
| [Battery](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Battery) | `0x000A` |
|
| [Battery](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Battery) | `0x000A` |
|
||||||
| [Floppy Drive](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Floppy-Drive) | `0x000B` |
|
| [Floppy Drive](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Floppy-Drive) | `0x000B` |
|
||||||
| [Radio Receiver](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Radio-Receiver) | `0x000C` |
|
| [Radio Receiver](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Radio-Receiver) | `0x000C` |
|
||||||
| [Universal Com Port](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Universal-Com-Port) | `0x000D` |
|
| [Universal Com Port](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Universal-Com-Port) | `0x000D` |
|
||||||
| [Core]() | `0x000E` |
|
| [Core]() | `0x000E` |
|
||||||
| [Shield]() | `0x000F` |
|
| [Shield]() | `0x000F` |
|
||||||
| [Construction Arm]() | `0x0010` |
|
| [Construction Arm]() | `0x0010` |
|
@ -16,19 +16,19 @@ Make sure to join the [Slack chat](https://join.slack.com/t/muchassemblyrequired
|
|||||||
- [Assembler directives](https://github.com/simon987/Much-Assembly-Required/wiki/Assembler-directives)
|
- [Assembler directives](https://github.com/simon987/Much-Assembly-Required/wiki/Assembler-directives)
|
||||||
|
|
||||||
### [Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware)
|
### [Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware)
|
||||||
- [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)
|
||||||
- [Laser](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Laser)
|
- [Laser](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Laser)
|
||||||
- [Legs](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Legs)
|
- [Legs](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Legs)
|
||||||
- [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-LiDAR)
|
- [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-LiDAR)
|
||||||
- [Keyboard](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Keyboard)
|
- [Keyboard](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Keyboard)
|
||||||
- [Battery](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Battery)
|
- [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)
|
- [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)
|
- [Clock](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Clock)
|
||||||
- [Floppy Drive](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Floppy-Drive)
|
- [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)
|
- [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)
|
||||||
|
|
||||||
### Game universe
|
### Game universe
|
||||||
- [Game universe](https://github.com/simon987/Much-Assembly-Required/wiki/Game-Universe)
|
- [Game universe](https://github.com/simon987/Much-Assembly-Required/wiki/Game-Universe)
|
||||||
@ -44,4 +44,4 @@ Make sure to join the [Slack chat](https://join.slack.com/t/muchassemblyrequired
|
|||||||
|
|
||||||
Installation instructions are work-in-progress, and might become outdated. Nevertheless, here is what is written up.
|
Installation instructions are work-in-progress, and might become outdated. Nevertheless, here is what is written up.
|
||||||
|
|
||||||
- [Installation instructions for Arch Linux](https://github.com/simon987/Much-Assembly-Required/wiki/Installation:-Arch-Linux)
|
- [Installation instructions for Arch Linux](https://github.com/simon987/Much-Assembly-Required/wiki/(Installation)-Arch-Linux)
|
@ -7,7 +7,7 @@ The NPCs spawned by the factory are bound to its [Settlement](https://github.com
|
|||||||
|
|
||||||
### Hacking
|
### Hacking
|
||||||
|
|
||||||
Units with a [ComPort](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Universal-Com-Port) are able to upload data to the factory so that the next spawned NPC becomes a [Hacked NPC](https://github.com/simon987/Much-Assembly-Required/wiki/Hacked-NPC). This gives the player the opportunity to control more than one unit.
|
Units with a [ComPort](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Universal-Com-Port) are able to upload data to the factory so that the next spawned NPC becomes a [Hacked NPC](https://github.com/simon987/Much-Assembly-Required/wiki/Hacked-NPC). This gives the player the opportunity to control more than one unit.
|
||||||
|
|
||||||
The Factory starts accepting data sent by the ComPort as soon as it has received the password for this Settlement (See [Settlement](https://github.com/simon987/Much-Assembly-Required/wiki/Settlement)). Attempts to send messages to the Factory while it is locked will fail (the `COMPORT_FRONT_PORT_OUT` command will return `0`). The factory has a buffer of `2048` words, attempts to send data beyond this will fail.
|
The Factory starts accepting data sent by the ComPort as soon as it has received the password for this Settlement (See [Settlement](https://github.com/simon987/Much-Assembly-Required/wiki/Settlement)). Attempts to send messages to the Factory while it is locked will fail (the `COMPORT_FRONT_PORT_OUT` command will return `0`). The factory has a buffer of `2048` words, attempts to send data beyond this will fail.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Radio tower is a structure that is part of a [Settlement](https://github.com/simon987/Much-Assembly-Required/wiki/Settlement). It can be used to broadcast messages in a certain range. To use it, simply send data via the [ComPort](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Universal-Com-Port) while standing directly in front of the tower.
|
Radio tower is a structure that is part of a [Settlement](https://github.com/simon987/Much-Assembly-Required/wiki/Settlement). It can be used to broadcast messages in a certain range. To use it, simply send data via the [ComPort](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Universal-Com-Port) while standing directly in front of the tower.
|
||||||
|
|
||||||
Nearby units with a [Radio Receiver](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Radio-Receiver) will be able to receive the data.
|
Nearby units with a [Radio Receiver](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Radio-Receiver) will be able to receive the data.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@ The memory represented in a table would look like this:
|
|||||||
|
|
||||||
| Address | Description |
|
| Address | Description |
|
||||||
| ------- | ----------- |
|
| ------- | ----------- |
|
||||||
| `0x0000 - 0x004F` | Memory used by the [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-LiDAR#interrupt-behavior) `GET_PATH` hardware interrupt behavior |
|
| `0x0000 - 0x004F` | Memory used by the [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-LiDAR#interrupt-behavior) `GET_PATH` hardware interrupt behavior |
|
||||||
| `0x0050` | The execution cost. Is set at the end of the tick. [source](https://github.com/simon987/Much-Assembly-Required/blob/master/Server/src/main/java/net/simon987/server/assembly/CPU.java) |
|
| `0x0050` | The execution cost. Is set at the end of the tick. [source](https://github.com/simon987/Much-Assembly-Required/blob/master/Server/src/main/java/net/simon987/server/assembly/CPU.java) |
|
||||||
| `0x0051:0x0052` | The number of instructions executed. Is set at the end of the tick. [source](https://github.com/simon987/Much-Assembly-Required/blob/master/Server/src/main/java/net/simon987/server/assembly/CPU.java) |
|
| `0x0051:0x0052` | The number of instructions executed. Is set at the end of the tick. [source](https://github.com/simon987/Much-Assembly-Required/blob/master/Server/src/main/java/net/simon987/server/assembly/CPU.java) |
|
||||||
| `0x0053 - 0x00FF` | Not used, but probably not smart to use since it might be reserved for future use cases |
|
| `0x0053 - 0x00FF` | Not used, but probably not smart to use since it might be reserved for future use cases |
|
||||||
| `0x0100 - 0x01FF` | Memory used by the [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-LiDAR#interrupt-behavior) `GET_MAP` hardware interrupt behavior |
|
| `0x0100 - 0x01FF` | Memory used by the [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-LiDAR#interrupt-behavior) `GET_MAP` hardware interrupt behavior |
|
||||||
| `0x0200 - 0x0200 + PROGRAM_SIZE` | The instructions that make up your program |
|
| `0x0200 - 0x0200 + PROGRAM_SIZE` | The instructions that make up your program |
|
||||||
| `...`| Not assigned to anything |
|
| `...`| Not assigned to anything |
|
||||||
| `0x.... - 0xFFFF` | The start of your stack, pointed to by the SP Register at the start of your program. This grows towards `0x0000` |
|
| `0x.... - 0xFFFF` | The start of your stack, pointed to by the SP Register at the start of your program. This grows towards `0x0000` |
|
@ -9,18 +9,18 @@
|
|||||||
|
|
||||||
### [Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware)
|
### [Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware)
|
||||||
|
|
||||||
- [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)
|
||||||
- [Laser](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Laser)
|
- [Laser](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Laser)
|
||||||
- [Legs](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Legs)
|
- [Legs](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Legs)
|
||||||
- [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-LiDAR)
|
- [LiDAR](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-LiDAR)
|
||||||
- [Keyboard](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Keyboard)
|
- [Keyboard](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Keyboard)
|
||||||
- [Battery](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Battery)
|
- [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)
|
- [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)
|
- [Clock](https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-Clock)
|
||||||
- [Floppy Drive](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Floppy-Drive)
|
- [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)
|
- [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)
|
||||||
|
|
||||||
### [Random-Access Memory](https://github.com/simon987/Much-Assembly-Required/wiki/Random-Access-Memory)
|
### [Random-Access Memory](https://github.com/simon987/Much-Assembly-Required/wiki/Random-Access-Memory)
|
@ -1,4 +1,4 @@
|
|||||||
* [Constants](https://github.com/simon987/Much-Assembly-Required/wiki/Snippet:-Constants)
|
* [Constants](https://github.com/simon987/Much-Assembly-Required/wiki/(Snippet)-Constants)
|
||||||
* [Dump memory to disk](https://github.com/simon987/Much-Assembly-Required/wiki/Snippet:-Dump-memory-to-disk)
|
* [Dump memory to disk](https://github.com/simon987/Much-Assembly-Required/wiki/(Snippet)-Dump-memory-to-disk)
|
||||||
* [Manhattan Distance](https://github.com/simon987/Much-Assembly-Required/wiki/Snippet:-Manhattan-distance)
|
* [Manhattan Distance](https://github.com/simon987/Much-Assembly-Required/wiki/(Snippet)-Manhattan-distance)
|
||||||
* [Keyboard controlled robot](https://github.com/simon987/Much-Assembly-Required/wiki/Snippet:-Keyboard-controlled-robot)
|
* [Keyboard controlled robot](https://github.com/simon987/Much-Assembly-Required/wiki/(Snippet)-Keyboard-controlled-robot)
|
Loading…
x
Reference in New Issue
Block a user