mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-13 01:29:57 +00:00
Implement status flags for LDA emulation.
This commit is contained in:
parent
bcedb50e48
commit
14233cf3ca
@ -10,10 +10,16 @@ emul_lda(rk65c02emu_t *e, instruction_t *i)
|
||||
|
||||
e->regs.A = instruction_data_read_1(e, &id, i);
|
||||
|
||||
|
||||
/* adjust status flags */
|
||||
if (e->regs.A & NEGATIVE)
|
||||
e->regs.P |= P_NEGATIVE;
|
||||
else
|
||||
e->regs.P &= ~P_NEGATIVE;
|
||||
|
||||
|
||||
if (e->regs.A == 0)
|
||||
e->regs.P |= P_ZERO;
|
||||
else
|
||||
e->regs.P &= ~P_ZERO;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -28,6 +28,8 @@ struct reg_state {
|
||||
#define P_SIGN_OVERFLOW 0x40
|
||||
#define P_NEGATIVE 0x80
|
||||
|
||||
#define NEGATIVE P_NEGATIVE
|
||||
|
||||
typedef struct reg_state reg_state_t;
|
||||
|
||||
struct rk65c02emu {
|
||||
|
Loading…
Reference in New Issue
Block a user