From: Patrick Pelletier Date: Fri, 10 Aug 2018 19:58:48 +0000 (-0700) Subject: sim65: Fix "$2C: BIT abs" to access the correct address. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5cdaa96e4c65854b30fa837d0cc52f4644aeae0a;hp=a9ce4dc76cbc338ea1812bd37663593e658f8f1e;p=cc65 sim65: Fix "$2C: BIT abs" to access the correct address. Bug is documented here: http://forum.6502.org/viewtopic.php?f=2&t=5242 --- diff --git a/src/sim65/6502.c b/src/sim65/6502.c index 0d0adbf8b..bfbfbd78c 100644 --- a/src/sim65/6502.c +++ b/src/sim65/6502.c @@ -739,7 +739,7 @@ static void OPC_6502_2C (void) unsigned Addr; unsigned char Val; Cycles = 4; - Addr = MemReadByte (Regs.PC+1); + Addr = MemReadWord (Regs.PC+1); Val = MemReadByte (Addr); SET_SF (Val & 0x80); SET_OF (Val & 0x40);