From a87935509535b933cf3f5f703f65daafcc8adc5c Mon Sep 17 00:00:00 2001 From: Test_User Date: Wed, 15 Feb 2023 22:01:03 -0500 Subject: Make conditional stuff work nicely --- cpu/instructions/opcode.txt | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'cpu/instructions/opcode.txt') diff --git a/cpu/instructions/opcode.txt b/cpu/instructions/opcode.txt index d69eda4..f43f58a 100644 --- a/cpu/instructions/opcode.txt +++ b/cpu/instructions/opcode.txt @@ -3,15 +3,20 @@ Binary format: is_conditional: - Appends 1 parameter to the normal parameter list for the instruction: - 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 + n: number of bits for current mode + s: minimum number of bits required to represent n-1 + /: integer division + + Appends 2 parameters to the normal parameter list for the instruction: + First parameter: + Lowest (n-s)/2 bits: + Which bits to check + Next (n-s)/2 bits: + Value for each of the above that it should match + Remaining bits: + Bitwise offset into second parameter for value to be used + Second parameter: + Value to be used Conditional instructions will be executed after unconditional ones -- cgit v1.2.3