diff options
| author | vin <git@vineetk.net> | 2024-06-10 12:55:40 +0530 |
|---|---|---|
| committer | vin <git@vineetk.net> | 2024-06-10 14:28:13 +0530 |
| commit | ebdf50cdf3a357a0e37a5751fd9d78ae975979a0 (patch) | |
| tree | 51add6cf1a1e0dccd90d56aa2c4e854267770a27 /cpu.c | |
| parent | 454276a50c5843e3401f9bc54d80cb7dda40b782 (diff) | |
implement tay, txa, tya
Diffstat (limited to 'cpu.c')
| -rw-r--r-- | cpu.c | 15 |
1 files changed, 12 insertions, 3 deletions
| @@ -588,7 +588,10 @@ tax(void) | |||
| 588 | static void | 588 | static void |
| 589 | tay(uint8_t arg) | 589 | tay(uint8_t arg) |
| 590 | { | 590 | { |
| 591 | /* TODO: complete this */ | 591 | regs.y = regs.a; |
| 592 | |||
| 593 | STATUS_UPDATE_ZERO(regs.y); | ||
| 594 | STATUS_UPDATE_NEGATIVE(regs.y); | ||
| 592 | } | 595 | } |
| 593 | 596 | ||
| 594 | static void | 597 | static void |
| @@ -600,7 +603,10 @@ tsx(uint8_t arg) | |||
| 600 | static void | 603 | static void |
| 601 | txa(uint8_t arg) | 604 | txa(uint8_t arg) |
| 602 | { | 605 | { |
| 603 | /* TODO: complete this */ | 606 | regs.a = regs.x; |
| 607 | |||
| 608 | STATUS_UPDATE_ZERO(regs.a); | ||
| 609 | STATUS_UPDATE_NEGATIVE(regs.a); | ||
| 604 | } | 610 | } |
| 605 | 611 | ||
| 606 | static void | 612 | static void |
| @@ -612,7 +618,10 @@ txs(uint8_t arg) | |||
| 612 | static void | 618 | static void |
| 613 | tya(uint8_t arg) | 619 | tya(uint8_t arg) |
| 614 | { | 620 | { |
| 615 | /* TODO: complete this */ | 621 | regs.a = regs.y; |
| 622 | |||
| 623 | STATUS_UPDATE_ZERO(regs.a); | ||
| 624 | STATUS_UPDATE_NEGATIVE(regs.a); | ||
| 616 | } | 625 | } |
| 617 | 626 | ||
| 618 | static void | 627 | static void |
