summaryrefslogtreecommitdiff
path: root/cpu/instructions/parameter.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/instructions/parameter.txt')
-rw-r--r--cpu/instructions/parameter.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/cpu/instructions/parameter.txt b/cpu/instructions/parameter.txt
new file mode 100644
index 0000000..c68edd1
--- /dev/null
+++ b/cpu/instructions/parameter.txt
@@ -0,0 +1,31 @@
+n: min number of bits to be able to represent all types
+TODO: define x
+
+Binary format:
+ type[n], data[x]
+
+
+Types:
+ Short immediate reference:
+ Value is placed directly in the data section
+
+ Immediate reference:
+ y: min size required to represent each power of two value less than or equal to the current mode (in bytes, and greater than or equal to 1)
+ data[0 to x-y-1]:
+ size of immediate value
+
+ data[x-y to x-1]:
+ byte offset into the array of immediate values
+
+ Register:
+ data just to select which register
+
+ Memory at immediate reference:
+ Uses RAM pointed to by the value as obtained in `immediate reference` above
+
+ Memory at register:
+ Uses RAM pointed to by the value as obtained in `register` above
+
+ TODO: Will add more later
+
+All memory references go through any configured translation thereof, unless specified otherwise