mirror of
https://github.com/bradgrantham/apple2e.git
synced 2024-09-27 11:01:13 +00:00
another LSR and another EOR
This commit is contained in:
parent
dcc884487e
commit
21a5e8f112
21
apple2e.cpp
21
apple2e.cpp
@ -629,6 +629,18 @@ struct CPU6502
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x4E: {
|
||||
int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256;
|
||||
if(debug & DEBUG_DECODE) printf("LSR %04X\n", addr);
|
||||
unsigned char m = bus.read(addr);
|
||||
flag_change(C, m & 0x01);
|
||||
m = m >> 1;
|
||||
flag_change(N, m & 0x80);
|
||||
flag_change(Z, m == 0);
|
||||
bus.write(addr, m);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x4A: {
|
||||
if(debug & DEBUG_DECODE) printf("LSR A\n");
|
||||
flag_change(C, a & 0x01);
|
||||
@ -862,6 +874,15 @@ struct CPU6502
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x45: {
|
||||
unsigned char zpg = read_pc_inc(bus);
|
||||
if(debug & DEBUG_DECODE) printf("EOR %02X\n", zpg);
|
||||
a = a ^ bus.read(zpg);
|
||||
flag_change(N, a & 0x80);
|
||||
flag_change(Z, a == 0);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x49: {
|
||||
unsigned char imm = read_pc_inc(bus);
|
||||
if(debug & DEBUG_DECODE) printf("EOR #%02X\n", imm);
|
||||
|
Loading…
Reference in New Issue
Block a user