diff options
Diffstat (limited to '')
-rw-r--r-- | cpu/instructions/conditions/bitwise_condition.txt | 12 | ||||
-rw-r--r-- | cpu/instructions/conditions/save_condition.txt | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/cpu/instructions/conditions/bitwise_condition.txt b/cpu/instructions/conditions/bitwise_condition.txt new file mode 100644 index 0000000..48ddabd --- /dev/null +++ b/cpu/instructions/conditions/bitwise_condition.txt @@ -0,0 +1,12 @@ +Number of parameters: 3 + +Usage: + bitwise_condition <input> <bits to be compared> <value to compare with> + +Effect: + Sets the zero flag if exactly one of <bits to be compared> in <input> match <value to compare with> + Sets the overflow flag if at least one of <bits to be compared> in <input> match <value to compare with> + Sets the carry flag if all of <bits to be compared> in <input> match <value to compare with> + +Exceptions: + None diff --git a/cpu/instructions/conditions/save_condition.txt b/cpu/instructions/conditions/save_condition.txt new file mode 100644 index 0000000..a7df9d2 --- /dev/null +++ b/cpu/instructions/conditions/save_condition.txt @@ -0,0 +1,18 @@ +Number of parameters: + +Usage: + save_condition <output> <offset> <conditional parameter> + +conditional parameter: same as is_conditional from ../opcode.txt, but with the following changes: + Values to be compared are instead xor'd + +Effect: + Saves the selected flags to <output> at bitwise position <offset> + Flags are xor'd with the comparison value + Resulting value is shifted down to not have gaps from unused flags + +Exceptions: + None + +Notes: + Will be executed in the conditional phase |