summaryrefslogtreecommitdiff
path: root/cpu/instructions/execution_control
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2022-11-22 12:46:34 -0500
committerTest_User <hax@andrewyu.org>2022-11-22 12:46:34 -0500
commit05476cc3ffd457f2d477edaf27998003bdaf7057 (patch)
tree84a8413830871ba37b92192852400225f1cc00b5 /cpu/instructions/execution_control
parentc98515e7bcede03bc9334e060f6386ef1e653801 (diff)
downloadspecification-05476cc3ffd457f2d477edaf27998003bdaf7057.tar.gz
specification-05476cc3ffd457f2d477edaf27998003bdaf7057.zip
Started listing instructions, improved cpu readability of format A a little
Diffstat (limited to 'cpu/instructions/execution_control')
-rw-r--r--cpu/instructions/execution_control/call.txt11
-rw-r--r--cpu/instructions/execution_control/call_conditional.txt22
-rw-r--r--cpu/instructions/execution_control/jump.txt10
-rw-r--r--cpu/instructions/execution_control/jump_conditional.txt21
4 files changed, 64 insertions, 0 deletions
diff --git a/cpu/instructions/execution_control/call.txt b/cpu/instructions/execution_control/call.txt
new file mode 100644
index 0000000..edec5f1
--- /dev/null
+++ b/cpu/instructions/execution_control/call.txt
@@ -0,0 +1,11 @@
+Number of parameters: 1
+
+Usage:
+ call <target>
+
+Effect:
+ IP pushed to stack
+ IP moved to <target>
+
+Exceptions:
+ None
diff --git a/cpu/instructions/execution_control/call_conditional.txt b/cpu/instructions/execution_control/call_conditional.txt
new file mode 100644
index 0000000..7663e54
--- /dev/null
+++ b/cpu/instructions/execution_control/call_conditional.txt
@@ -0,0 +1,22 @@
+Number of parameters: 2
+
+Usage: call_conditional <type_and_index> <target>
+ type_and_index:
+ Lowest 3 bits: flags for each of the following checked, from lowest to highest:
+ Zero
+ Overflow
+ Carry
+ Next 3 bits:
+ Value for each of the above that it should match
+ Remaining bits:
+ Index into instruction queue for which result is to be compared
+
+Effect:
+ If all of the checked flags match the value to compare to:
+ IP pushed to stack
+ IP moved to <target>
+
+ If no flags are to be checked, it will always set IP
+
+Exceptions:
+ Instruction reference nonexistent
diff --git a/cpu/instructions/execution_control/jump.txt b/cpu/instructions/execution_control/jump.txt
new file mode 100644
index 0000000..6675f03
--- /dev/null
+++ b/cpu/instructions/execution_control/jump.txt
@@ -0,0 +1,10 @@
+Number of parameters: 1
+
+Usage:
+ jump <target>
+
+Effect:
+ Sets IP to <target>
+
+Exceptions:
+ None
diff --git a/cpu/instructions/execution_control/jump_conditional.txt b/cpu/instructions/execution_control/jump_conditional.txt
new file mode 100644
index 0000000..52f323b
--- /dev/null
+++ b/cpu/instructions/execution_control/jump_conditional.txt
@@ -0,0 +1,21 @@
+Number of parameters: 2
+
+Usage: jump_conditional <type_and_index> <target>
+ type_and_index:
+ Lowest 3 bits: flags for each of the following checked, from lowest to highest:
+ Zero
+ Overflow
+ Carry
+ Next 3 bits:
+ Value for each of the above that it should match
+ Remaining bits:
+ Index into instruction queue for which result is to be compared
+
+Effect:
+ If all of the checked flags match the value to compare to:
+ IP moved to <target>
+
+ If no flags are to be checked, it will always set IP
+
+Exceptions:
+ Instruction reference nonexistent