1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-30 05:30:41 +00:00

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
commit c52d7b27e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 */