From 28bdd4d190900a9a5c731177d41f82112c66a256 Mon Sep 17 00:00:00 2001 From: Simon Fortier Date: Wed, 15 Nov 2017 15:47:42 -0500 Subject: [PATCH] Updated CPU (markdown) --- CPU.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CPU.md b/CPU.md index 975e5a6..5cb40fe 100644 --- a/CPU.md +++ b/CPU.md @@ -1,3 +1,11 @@ +## Execution cycle +The code inside the `.text` segment is executed entirely at the beginning of each tick. Each millisecond of execution costs 1 kJ of energy. The execution time is rounded down to the nearest integer meaning that the first 999μs are 'free'. The execution will halt when there is not enough energy available (but the first 999μs are always executed) or when execution time exceeds 100ms*. + +*_about 4,800,000 instructions in game server (2.4 GHz, single core)_ + +_See also_: [Battery Hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Battery) + + ## CPU Architecture Work in progress @@ -5,7 +13,7 @@ Work in progress ## Random-access memory -Work in progress +From a storage point of view, the cpu memory spaces are organized as identical arrays of 16-bit words. The cpu has access to its full address space: 65,6536 (0x10000) words of memory (total 128KB). By default, the stack base is at address 0xFFFF and grows towards lower addresses. ## General purpose registers