diff options
author | Test_User <hax@andrewyu.org> | 2023-02-15 19:54:24 -0500 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2023-02-15 19:54:24 -0500 |
commit | 5a87ffe89c6509c295d22c9b105fa1126328f6c2 (patch) | |
tree | 630f3846bb0098417fb3d838c08f16ed19fda886 /cpu/instructions/arithmetic | |
parent | 22029d37cbf391a35304d32778bd01ecf40de482 (diff) | |
download | specification-5a87ffe89c6509c295d22c9b105fa1126328f6c2.tar.gz specification-5a87ffe89c6509c295d22c9b105fa1126328f6c2.zip |
Add more instructions
Diffstat (limited to 'cpu/instructions/arithmetic')
-rw-r--r-- | cpu/instructions/arithmetic/add.txt | 10 | ||||
-rw-r--r-- | cpu/instructions/arithmetic/decrement.txt | 10 | ||||
-rw-r--r-- | cpu/instructions/arithmetic/increment.txt | 10 | ||||
-rw-r--r-- | cpu/instructions/arithmetic/notes.txt | 4 | ||||
-rw-r--r-- | cpu/instructions/arithmetic/subtract.txt | 10 |
5 files changed, 44 insertions, 0 deletions
diff --git a/cpu/instructions/arithmetic/add.txt b/cpu/instructions/arithmetic/add.txt new file mode 100644 index 0000000..3668033 --- /dev/null +++ b/cpu/instructions/arithmetic/add.txt @@ -0,0 +1,10 @@ +Number of parameters: 3 + +Usage: + Add <output> <value0> <value1> + +Effect: + Adds <value0> to <value1> and stores it in <output> + +Exceptions: + None diff --git a/cpu/instructions/arithmetic/decrement.txt b/cpu/instructions/arithmetic/decrement.txt new file mode 100644 index 0000000..7d56a45 --- /dev/null +++ b/cpu/instructions/arithmetic/decrement.txt @@ -0,0 +1,10 @@ +Number of parameters: 1 + +Usage: + decrement <output> + +Effect: + Subtracts 1 from <output> + +Exceptions: + None diff --git a/cpu/instructions/arithmetic/increment.txt b/cpu/instructions/arithmetic/increment.txt new file mode 100644 index 0000000..60cd856 --- /dev/null +++ b/cpu/instructions/arithmetic/increment.txt @@ -0,0 +1,10 @@ +Number of parameters: 1 + +Usage: + increment <output> + +Effect: + Adds 1 to <output> + +Exceptions: + None diff --git a/cpu/instructions/arithmetic/notes.txt b/cpu/instructions/arithmetic/notes.txt new file mode 100644 index 0000000..29500cb --- /dev/null +++ b/cpu/instructions/arithmetic/notes.txt @@ -0,0 +1,4 @@ +Unless otherwise specified, all arithmetic instructions: + Set the zero flag when the result is 0 + Set the overflow flag when a signed operation results in inversion of the sign due to lack of bits to store the value + Set the carry flag when an unsigned operation results in a lower number due to lack of bits to store the value diff --git a/cpu/instructions/arithmetic/subtract.txt b/cpu/instructions/arithmetic/subtract.txt new file mode 100644 index 0000000..273ca46 --- /dev/null +++ b/cpu/instructions/arithmetic/subtract.txt @@ -0,0 +1,10 @@ +Number of parameters: 3 + +Usage: + Subtract <output> <value0> <value1> + +Effect: + Subtracts <value0> from <value1> and stores it in <output> + +Exceptions: + None |