summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-02-15 22:13:16 -0500
committerTest_User <hax@andrewyu.org>2023-02-15 22:13:16 -0500
commit9d1465f1c859ca97517c26f4bf751b682ec337e9 (patch)
tree291bc5b8b77d29bf07ed8281bb6771f5447f8c4b
parenta87935509535b933cf3f5f703f65daafcc8adc5c (diff)
downloadspecification-9d1465f1c859ca97517c26f4bf751b682ec337e9.tar.gz
specification-9d1465f1c859ca97517c26f4bf751b682ec337e9.zip
Use parameter size, not current CPU mode
-rw-r--r--cpu/instructions/opcode.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpu/instructions/opcode.txt b/cpu/instructions/opcode.txt
index f43f58a..16cdbd3 100644
--- a/cpu/instructions/opcode.txt
+++ b/cpu/instructions/opcode.txt
@@ -3,8 +3,8 @@ Binary format:
is_conditional:
- n: number of bits for current mode
- s: minimum number of bits required to represent n-1
+ n: number of bits in first parameter
+ s: minimum number of bits required to represent (number of bits for current mode)-1
/: integer division
Appends 2 parameters to the normal parameter list for the instruction:
@@ -21,3 +21,7 @@ is_conditional:
Conditional instructions will be executed after unconditional ones
Conditional instructions will never set flags, if a conditional instruction references another, it will always be based on null flags
+
+Exceptions:
+ If s > n:
+ TODO: make exception list