From 0ba0d793ca60189fa8378399d32d6299a1dd9db5 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Fri, 1 Dec 2023 20:12:52 +1100 Subject: fixed CR with terminal & VRAM --- src/cpu/instructions.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cpu/instructions.c') diff --git a/src/cpu/instructions.c b/src/cpu/instructions.c index cb80855..da093ec 100644 --- a/src/cpu/instructions.c +++ b/src/cpu/instructions.c @@ -44,7 +44,7 @@ void fSTY(Addressing addr, address val){ // Arithmetic Instructions void fADC(Addressing addr, address val){ - int buffer = acc + idata.value; + int buffer = (int)acc + idata.value; SetFlagV(buffer, acc); if (buffer > 255) @@ -139,8 +139,7 @@ void fJMP(Addressing addr, address val){ PC = val; PC -= 2; } -void fBCC(Addressing addr, address val){ //FINISH ALL BRANCH INSTRUCTIONS - //signed char val down to BVC +void fBCC(Addressing addr, address val){ if (getFlag(flag_C) == 0) PC += (char)val; } -- cgit v1.2.3