From 45c231297657ad4a89e24bf0ee95478dd6fc78df Mon Sep 17 00:00:00 2001 From: vin Date: Sun, 30 Jun 2024 08:58:06 -0400 Subject: [PATCH] fix incorrect argument for ASL and LSR --- cpu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpu.c b/cpu.c index b76e346..ca4f2c4 100644 --- a/cpu.c +++ b/cpu.c @@ -904,28 +904,28 @@ interpret(void) break; case 0x06: mode = AM_ZP; - arg = opcode_arg(mode); + arg = opcode_mem(mode); asl(arg); cycles += 5; printf("ASL"); break; case 0x16: mode = AM_ZP_X; - arg = opcode_arg(mode); + arg = opcode_mem(mode); asl(arg); cycles += 6; printf("ASL"); break; case 0x0e: mode = AM_ABS; - arg = opcode_arg(mode); + arg = opcode_mem(mode); asl(arg); cycles += 6; printf("ASL"); break; case 0x1e: mode = AM_ABS_X; - arg = opcode_arg(mode); + arg = opcode_mem(mode); asl(arg); cycles += 6; printf("ASL"); @@ -1477,14 +1477,14 @@ interpret(void) break; case 0x4e: mode = AM_ABS; - arg = opcode_arg(mode); + arg = opcode_mem(mode); lsr(arg); cycles += 6; printf("LSR"); break; case 0x5e: mode = AM_ABS_X; - arg = opcode_arg(mode); + arg = opcode_mem(mode); lsr(arg); cycles += 6; printf("LSR");