Merge pull request #2564 from sidneycadot/fix-cpuregs-linkage

sim65: simulated CPU registers can be accessed from outside 6502.c.
This commit is contained in:
Bob Andrews
2024-12-19 21:09:37 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -392,7 +392,7 @@ CPUType CPU;
typedef void (*OPFunc) (void);
/* The CPU registers */
static CPURegs Regs;
CPURegs Regs;
/* Cycles for the current insn */
static unsigned Cycles;

View File

@@ -65,6 +65,9 @@ struct CPURegs {
unsigned PC; /* Program counter */
};
/* Current CPU registers */
extern CPURegs Regs;
/* Status register bits */
#define CF 0x01 /* Carry flag */
#define ZF 0x02 /* Zero flag */