From 1eeb20e0039a1e1bc1753731f02f75b9422a7b11 Mon Sep 17 00:00:00 2001 From: Arthur Paulino Date: Fri, 5 Jan 2018 17:46:39 -0300 Subject: [PATCH] Created Random-Access Memory (markdown) --- Random-Access-Memory.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Random-Access-Memory.md diff --git a/Random-Access-Memory.md b/Random-Access-Memory.md new file mode 100644 index 0000000..8e41dc4 --- /dev/null +++ b/Random-Access-Memory.md @@ -0,0 +1,14 @@ +From a storage point of view, the Cubot's RAM spaces are organized as identical arrays of 16-bit words. The CPU has access to its full address space: 65536 (0x10000) words of memory (total 128KB). By default, the stack base is at address 0xFFFF and grows towards lower addresses. + +The memory represented in a table would look like this: + +| 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 | +| `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) | +| `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 | +| `0x0200 - 0x0200 + PROGRAM_SIZE` | The instructions that make up your program | +| `...`| Not assigned to anything | +| `0x.... - 0xFFFF` | The start of your stack, pointed to by the BP Register at the start of your program. This grows towards `0x0000` | \ No newline at end of file