1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-02 09:34:22 +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); typedef void (*OPFunc) (void);
/* The CPU registers */ /* The CPU registers */
static CPURegs Regs; CPURegs Regs;
/* Cycles for the current insn */ /* Cycles for the current insn */
static unsigned Cycles; static unsigned Cycles;

View File

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