summaryrefslogtreecommitdiff
path: root/src/cpu/instructions.c
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-11-30 19:19:22 +1100
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-11-30 19:19:22 +1100
commit40447eccd6db43d636ccc518ae7792b7b43834b5 (patch)
tree09471aa08737e6555dd060179b6a33944e931f51 /src/cpu/instructions.c
parent7a3307ad3785a6cd72c820ea6b44086817a20e81 (diff)
fixed BIT and branch instructions
Diffstat (limited to 'src/cpu/instructions.c')
-rw-r--r--src/cpu/instructions.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cpu/instructions.c b/src/cpu/instructions.c
index 50941a8..36e2a41 100644
--- a/src/cpu/instructions.c
+++ b/src/cpu/instructions.c
@@ -158,56 +158,56 @@ void fJMP(Addressing addr, address val){
void fBCC(Addressing addr, address val){ //FINISH ALL BRANCH INSTRUCTIONS
//signed char val down to BVC
if (getFlag(flag_C) == 0)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}
void fBCS(Addressing addr, address val){
if (getFlag(flag_C) == 1)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}
void fBEQ(Addressing addr, address val){
if (getFlag(flag_Z) == 1)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}
void fBNE(Addressing addr, address val){
if (getFlag(flag_Z) == 0)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}
void fBMI(Addressing addr, address val){
if (getFlag(flag_N) == 1)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}
void fBPL(Addressing addr, address val){
if (getFlag(flag_N) == 0)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}
void fBVS(Addressing addr, address val){
if (getFlag(flag_V) == 1)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}
void fBVC(Addressing addr, address val){
if (getFlag(flag_V) == 0)
- PC += val;
+ PC += (char)val;
else
PC += idata.length;
}