added LAX
This commit is contained in:
parent
cb890b0960
commit
2596ac2c65
|
@ -462,6 +462,15 @@ void execute(struct CPU* cpu)
|
|||
cpu->pc.word = cpu->fetchedAddress;
|
||||
} break;
|
||||
|
||||
case LAX:
|
||||
{
|
||||
cpu->acc = cpu->fetchedVal;
|
||||
cpu->x = cpu->fetchedVal;
|
||||
|
||||
cpu->status.negative = ((cpu->acc & 0x80) == 0x80);
|
||||
cpu->status.zero = (cpu->acc == 0x00);
|
||||
} break;
|
||||
|
||||
case LDA:
|
||||
{
|
||||
cpu->acc = cpu->fetchedVal;
|
||||
|
|
|
@ -177,7 +177,7 @@ const struct Opcode OPCODE_TABLE[256] =
|
|||
/* A0 */ NEW_OPCODE(LDY, IMM, 2, 2, 0),
|
||||
/* A1 */ NEW_OPCODE(LDA, INDX, 6, 2, 0),
|
||||
/* A2 */ NEW_OPCODE(LDX, IMM, 2, 2, 0),
|
||||
/* A3 */ NEW_OPCODE(LAX, INDX, 0, 1, 1),
|
||||
/* A3 */ NEW_OPCODE(LAX, INDX, 6, 2, 1),
|
||||
/* A4 */ NEW_OPCODE(LDY, ZPG, 3, 2, 0),
|
||||
/* A5 */ NEW_OPCODE(LDA, ZPG, 3, 2, 0),
|
||||
/* A6 */ NEW_OPCODE(LDX, ZPG, 3, 2, 0),
|
||||
|
|
Loading…
Reference in a new issue