summaryrefslogtreecommitdiff
path: root/cpu/instructions/parameter.txt
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-06-14 03:19:05 -0400
committerTest_User <hax@andrewyu.org>2023-06-14 03:19:05 -0400
commit523518b60efde6a605a8fbc33f14f9924fd08d69 (patch)
treef660b6c58e2f638800187030541c3d53e33c383e /cpu/instructions/parameter.txt
parent6efc740c4be65bdb7e9d1067d0f4137954732a10 (diff)
downloadspecification-523518b60efde6a605a8fbc33f14f9924fd08d69.tar.gz
specification-523518b60efde6a605a8fbc33f14f9924fd08d69.zip
Bit of change to parameters, and fixing it to actually say what I meant; more assembler progress as well
Diffstat (limited to 'cpu/instructions/parameter.txt')
-rw-r--r--cpu/instructions/parameter.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/cpu/instructions/parameter.txt b/cpu/instructions/parameter.txt
index 47cf30a..311c00a 100644
--- a/cpu/instructions/parameter.txt
+++ b/cpu/instructions/parameter.txt
@@ -1,6 +1,6 @@
-n: min number of bits to be able to represent all types
+n: min number of bits to be able to represent all parameter types
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)
-x: y + [min size to represent each valid offset into the immediate value array]
+x: n + y + max([min size to represent each valid offset into the immediate value array], [min size to represent all registers])
Binary format:
type[n], data[x]
@@ -11,20 +11,26 @@ Types:
Value is placed directly in the data section
Immediate reference:
- data[0 to x-y-1]:
+ data[n 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
+ data[n to x-y-1]:
+ how much of the register to use
+
+ data[x-y to x-1]:
+ which register to use
Memory at immediate reference:
Uses RAM pointed to by the value as obtained in `immediate reference` above
+ Size is specified by data[0 to n-1]
Memory at register:
Uses RAM pointed to by the value as obtained in `register` above
+ Size is specified by data[0 to n-1]
TODO: Will add more later