fix incorrect argument for ASL and LSR

This commit is contained in:
Vineet K 2024-06-30 08:58:06 -04:00
parent 99082b5528
commit 45c2312976

12
cpu.c
View File

@ -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");