From fbecaa6b0a998c870ae972b985cbdcfd0172b29c Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Thu, 17 Aug 2023 11:40:39 +1000 Subject: thanks Hugh for these fixes --- makefile | 1 + src/cpu/6502.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 60f7f65..b352f37 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,7 @@ SDL = -L/usr/lib -lSDL2 interpreter: + mkdir build gcc src/interpreter.c -o build/testing clean: diff --git a/src/cpu/6502.c b/src/cpu/6502.c index 5aaffef..672ead3 100644 --- a/src/cpu/6502.c +++ b/src/cpu/6502.c @@ -29,7 +29,7 @@ void flagClear(byte flag){ // Functions which perform reusable routines for finding if a specific flag should be set. void setFlagN(byte x){ - if (x & flag_N == flag_N) + if ((x & flag_N) == flag_N) setFlag(flag_N, 1); else setFlag(flag_N, 0); -- cgit v1.2.3