From 88e7a2f89b3a193de470b4c1cbff71fc20a87943 Mon Sep 17 00:00:00 2001 From: Madeline Cronin Date: Wed, 4 Sep 2024 16:41:20 +0100 Subject: [PATCH] Tweak behaviour of pushing the program counter to stack in control flow instructions. Made it so that it pushes the next address, rather than the current address, as to prevent going in loops. --- ISA_spec.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ISA_spec.txt b/ISA_spec.txt index e8071cc..a12a8da 100644 --- a/ISA_spec.txt +++ b/ISA_spec.txt @@ -1,4 +1,4 @@ -Maddie's test ISA Version 1.0.8 +Maddie's test ISA Version 1.0.9 Table of contents: @@ -103,7 +103,7 @@ Control flow: ----0100|JSPITT--|--------|-------- J: (J=0) Jump to the described address, (J=1) Add the described value to the program counter -S: (S=1) Push the current address to the stack +S: (S=1) Push what would have been the next address to the stack P: (P=1) Pop from the stack and use the stack value instead of a register value I: (I=1) If interrupts are enabled, jump to 0. This overrides J and P, -- 2.43.4