implement tay, txa, tya

This commit is contained in:
Vineet K 2024-06-10 12:55:40 +05:30
parent 454276a50c
commit ebdf50cdf3

15
cpu.c
View File

@ -588,7 +588,10 @@ tax(void)
static void static void
tay(uint8_t arg) tay(uint8_t arg)
{ {
/* TODO: complete this */ regs.y = regs.a;
STATUS_UPDATE_ZERO(regs.y);
STATUS_UPDATE_NEGATIVE(regs.y);
} }
static void static void
@ -600,7 +603,10 @@ tsx(uint8_t arg)
static void static void
txa(uint8_t arg) txa(uint8_t arg)
{ {
/* TODO: complete this */ regs.a = regs.x;
STATUS_UPDATE_ZERO(regs.a);
STATUS_UPDATE_NEGATIVE(regs.a);
} }
static void static void
@ -612,7 +618,10 @@ txs(uint8_t arg)
static void static void
tya(uint8_t arg) tya(uint8_t arg)
{ {
/* TODO: complete this */ regs.a = regs.y;
STATUS_UPDATE_ZERO(regs.a);
STATUS_UPDATE_NEGATIVE(regs.a);
} }
static void static void