From 05476cc3ffd457f2d477edaf27998003bdaf7057 Mon Sep 17 00:00:00 2001 From: Test_User Date: Tue, 22 Nov 2022 12:46:34 -0500 Subject: Started listing instructions, improved cpu readability of format A a little --- cpu/instructions/execution_control/call.txt | 11 +++++++++++ .../execution_control/call_conditional.txt | 22 ++++++++++++++++++++++ cpu/instructions/execution_control/jump.txt | 10 ++++++++++ .../execution_control/jump_conditional.txt | 21 +++++++++++++++++++++ .../instruction_definition_template.txt | 7 +++++++ cpu/instructions/overview.txt | 4 ++-- 6 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 cpu/instructions/execution_control/call.txt create mode 100644 cpu/instructions/execution_control/call_conditional.txt create mode 100644 cpu/instructions/execution_control/jump.txt create mode 100644 cpu/instructions/execution_control/jump_conditional.txt create mode 100644 cpu/instructions/instruction_definition_template.txt 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 + +Effect: + IP pushed to stack + IP moved to + +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: + 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 + + 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 + +Effect: + Sets IP to + +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: + 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 + + If no flags are to be checked, it will always set IP + +Exceptions: + Instruction reference nonexistent diff --git a/cpu/instructions/instruction_definition_template.txt b/cpu/instructions/instruction_definition_template.txt new file mode 100644 index 0000000..328ec16 --- /dev/null +++ b/cpu/instructions/instruction_definition_template.txt @@ -0,0 +1,7 @@ +Number of parameters: + +Usage: + +Effect: + +Exceptions: diff --git a/cpu/instructions/overview.txt b/cpu/instructions/overview.txt index 3cfe266..5545697 100644 --- a/cpu/instructions/overview.txt +++ b/cpu/instructions/overview.txt @@ -25,9 +25,9 @@ Dynamic VLIW num_opcodes for each: opcode - num_instructions + num_parameters for each: - parameters + value size_of_immediate_references for each: value -- cgit v1.2.3