summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-02-16 16:36:07 -0500
committerTest_User <hax@andrewyu.org>2023-02-16 16:36:07 -0500
commite4f85d2fe57613a94a9cb99e3aca4df91b639e31 (patch)
tree9992b4eeec20bd12a13da71dffc44b9b5848e2d6
parentcf81293d79cf3a5cfbcdb55eb6368bbcb5f06fd7 (diff)
downloadspecification-e4f85d2fe57613a94a9cb99e3aca4df91b639e31.tar.gz
specification-e4f85d2fe57613a94a9cb99e3aca4df91b639e31.zip
Add bitwise instructions
-rw-r--r--cpu/instructions/bitwise/and.txt10
-rw-r--r--cpu/instructions/bitwise/arithmetic_shift_right.txt10
-rw-r--r--cpu/instructions/bitwise/exclusive_or.txt10
-rw-r--r--cpu/instructions/bitwise/not.txt10
-rw-r--r--cpu/instructions/bitwise/notes.txt4
-rw-r--r--cpu/instructions/bitwise/or.txt10
-rw-r--r--cpu/instructions/bitwise/rotate_left.txt10
-rw-r--r--cpu/instructions/bitwise/rotate_right.txt10
-rw-r--r--cpu/instructions/bitwise/shift_left.txt10
-rw-r--r--cpu/instructions/bitwise/shift_right.txt10
10 files changed, 94 insertions, 0 deletions
diff --git a/cpu/instructions/bitwise/and.txt b/cpu/instructions/bitwise/and.txt
new file mode 100644
index 0000000..9704083
--- /dev/null
+++ b/cpu/instructions/bitwise/and.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ and <output> <value0> <value1>
+
+Effect:
+ Sets <output> to the bitwise and of <value0> and <value1>
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/arithmetic_shift_right.txt b/cpu/instructions/bitwise/arithmetic_shift_right.txt
new file mode 100644
index 0000000..d7ea8a7
--- /dev/null
+++ b/cpu/instructions/bitwise/arithmetic_shift_right.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ arithmetic_shift_right <output> <value> <amount>
+
+Effect:
+ Sets <output> to <value> shifted to the right <amount> bits, filling in leading bits with the most significant bit of <value>
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/exclusive_or.txt b/cpu/instructions/bitwise/exclusive_or.txt
new file mode 100644
index 0000000..6f9497c
--- /dev/null
+++ b/cpu/instructions/bitwise/exclusive_or.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ exclusive_or <output> <value0> <value1>
+
+Effect:
+ Sets <output> to the bitwise exclusive or of <value0> and <value1>
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/not.txt b/cpu/instructions/bitwise/not.txt
new file mode 100644
index 0000000..8e8784a
--- /dev/null
+++ b/cpu/instructions/bitwise/not.txt
@@ -0,0 +1,10 @@
+Number of parameters: 2
+
+Usage:
+ not <output> <value>
+
+Effect:
+ Sets <output> to the bitwise not of <value>
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/notes.txt b/cpu/instructions/bitwise/notes.txt
new file mode 100644
index 0000000..f1694e9
--- /dev/null
+++ b/cpu/instructions/bitwise/notes.txt
@@ -0,0 +1,4 @@
+Unless otherwise specified, all bitwise instructions will:
+ Set the zero flag when all bits of the result are zero
+ Not set the carry flag
+ Not set the overflow flag
diff --git a/cpu/instructions/bitwise/or.txt b/cpu/instructions/bitwise/or.txt
new file mode 100644
index 0000000..94c7127
--- /dev/null
+++ b/cpu/instructions/bitwise/or.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ or <output> <value0> <value1>
+
+Effect:
+ Sets <output> to the bitwise or of <value0> and <value1>
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/rotate_left.txt b/cpu/instructions/bitwise/rotate_left.txt
new file mode 100644
index 0000000..10bec89
--- /dev/null
+++ b/cpu/instructions/bitwise/rotate_left.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ rotate_left <output> <value> <amount>
+
+Effect:
+ Sets <output> to <value> rotated to the left <amount> bits
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/rotate_right.txt b/cpu/instructions/bitwise/rotate_right.txt
new file mode 100644
index 0000000..39e29ff
--- /dev/null
+++ b/cpu/instructions/bitwise/rotate_right.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ rotate_right <output> <value> <amount>
+
+Effect:
+ Sets <output> to <value> rotated to the right <amount> bits
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/shift_left.txt b/cpu/instructions/bitwise/shift_left.txt
new file mode 100644
index 0000000..6f75777
--- /dev/null
+++ b/cpu/instructions/bitwise/shift_left.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ shift_left <output> <value> <amount>
+
+Effect:
+ Sets <output> to <value> shifted to the left <amount> bits
+
+Exceptions:
+ None
diff --git a/cpu/instructions/bitwise/shift_right.txt b/cpu/instructions/bitwise/shift_right.txt
new file mode 100644
index 0000000..8f871a7
--- /dev/null
+++ b/cpu/instructions/bitwise/shift_right.txt
@@ -0,0 +1,10 @@
+Number of parameters: 3
+
+Usage:
+ shift_right <output> <value> <amount>
+
+Effect:
+ Sets <output> to <value> shifted to the right <amount> bits
+
+Exceptions:
+ None