trunk/src/emu/cpu/ucom4/ucom4op.inc
| r243467 | r243468 | |
| 516 | 516 | if (!check_op_43()) return; |
| 517 | 517 | |
| 518 | 518 | // TAW: Transfer ACC to W |
| 519 | | op_illegal(); |
| 519 | m_icount--; |
| 520 | ucom43_reg_w(UCOM43_W, m_acc); |
| 520 | 521 | } |
| 521 | 522 | |
| 522 | 523 | void ucom4_cpu_device::op_taz() |
| r243467 | r243468 | |
| 524 | 525 | if (!check_op_43()) return; |
| 525 | 526 | |
| 526 | 527 | // TAZ: Transfer ACC to Z |
| 527 | | op_illegal(); |
| 528 | m_icount--; |
| 529 | ucom43_reg_w(UCOM43_Z, m_acc); |
| 528 | 530 | } |
| 529 | 531 | |
| 530 | 532 | void ucom4_cpu_device::op_thx() |
| r243467 | r243468 | |
| 532 | 534 | if (!check_op_43()) return; |
| 533 | 535 | |
| 534 | 536 | // THX: Transfer DPh to X |
| 535 | | op_illegal(); |
| 537 | m_icount--; |
| 538 | ucom43_reg_w(UCOM43_X, m_dph); |
| 536 | 539 | } |
| 537 | 540 | |
| 538 | 541 | void ucom4_cpu_device::op_tly() |
| r243467 | r243468 | |
| 540 | 543 | if (!check_op_43()) return; |
| 541 | 544 | |
| 542 | 545 | // TLY: Transfer DPl to Y |
| 543 | | op_illegal(); |
| 546 | m_icount--; |
| 547 | ucom43_reg_w(UCOM43_Y, m_dpl); |
| 544 | 548 | } |
| 545 | 549 | |
| 546 | 550 | |
| r243467 | r243468 | |
| 551 | 555 | if (!check_op_43()) return; |
| 552 | 556 | |
| 553 | 557 | // XAW: Exchange ACC with W |
| 554 | | op_illegal(); |
| 558 | m_icount--; |
| 559 | UINT8 old_acc = m_acc; |
| 560 | m_acc = ucom43_reg_r(UCOM43_W); |
| 561 | ucom43_reg_w(UCOM43_W, old_acc); |
| 555 | 562 | } |
| 556 | 563 | |
| 557 | 564 | void ucom4_cpu_device::op_xaz() |
| r243467 | r243468 | |
| 559 | 566 | if (!check_op_43()) return; |
| 560 | 567 | |
| 561 | 568 | // XAZ: Exchange ACC with Z |
| 562 | | op_illegal(); |
| 569 | m_icount--; |
| 570 | UINT8 old_acc = m_acc; |
| 571 | m_acc = ucom43_reg_r(UCOM43_Z); |
| 572 | ucom43_reg_w(UCOM43_Z, old_acc); |
| 563 | 573 | } |
| 564 | 574 | |
| 565 | 575 | void ucom4_cpu_device::op_xhr() |
| r243467 | r243468 | |
| 567 | 577 | if (!check_op_43()) return; |
| 568 | 578 | |
| 569 | 579 | // XHR: Exchange DPh with R |
| 570 | | op_illegal(); |
| 580 | m_icount--; |
| 581 | UINT8 old_dph = m_dph; |
| 582 | m_dph = ucom43_reg_r(UCOM43_R); |
| 583 | ucom43_reg_w(UCOM43_R, old_dph); |
| 571 | 584 | } |
| 572 | 585 | |
| 573 | 586 | void ucom4_cpu_device::op_xhx() |
| r243467 | r243468 | |
| 575 | 588 | if (!check_op_43()) return; |
| 576 | 589 | |
| 577 | 590 | // XHX: Exchange DPh with X |
| 578 | | op_illegal(); |
| 591 | m_icount--; |
| 592 | UINT8 old_dph = m_dph; |
| 593 | m_dph = ucom43_reg_r(UCOM43_X); |
| 594 | ucom43_reg_w(UCOM43_X, old_dph); |
| 579 | 595 | } |
| 580 | 596 | |
| 581 | 597 | void ucom4_cpu_device::op_xls() |
| r243467 | r243468 | |
| 583 | 599 | if (!check_op_43()) return; |
| 584 | 600 | |
| 585 | 601 | // XLS: Exchange DPl with S |
| 586 | | op_illegal(); |
| 602 | m_icount--; |
| 603 | UINT8 old_dpl = m_dpl; |
| 604 | m_dpl = ucom43_reg_r(UCOM43_S); |
| 605 | ucom43_reg_w(UCOM43_S, old_dpl); |
| 587 | 606 | } |
| 588 | 607 | |
| 589 | 608 | void ucom4_cpu_device::op_xly() |
| r243467 | r243468 | |
| 591 | 610 | if (!check_op_43()) return; |
| 592 | 611 | |
| 593 | 612 | // XLY: Exchange DPl with Y |
| 594 | | op_illegal(); |
| 613 | m_icount--; |
| 614 | UINT8 old_dpl = m_dpl; |
| 615 | m_dpl = ucom43_reg_r(UCOM43_Y); |
| 616 | ucom43_reg_w(UCOM43_Y, old_dpl); |
| 595 | 617 | } |
| 596 | 618 | |
| 597 | 619 | void ucom4_cpu_device::op_xc() |
| r243467 | r243468 | |
| 599 | 621 | if (!check_op_43()) return; |
| 600 | 622 | |
| 601 | 623 | // XC: Exchange Carry F/F with Carry Save F/F |
| 602 | | op_illegal(); |
| 624 | UINT8 c = m_carry_f; |
| 625 | m_carry_f = m_carry_s_f; |
| 626 | m_carry_s_f = c; |
| 603 | 627 | } |
| 604 | 628 | |
| 605 | 629 | |
| r243467 | r243468 | |
| 610 | 634 | if (!check_op_43()) return; |
| 611 | 635 | |
| 612 | 636 | // SFB B: Set a single bit of FLAG |
| 613 | | op_illegal(); |
| 637 | m_icount--; |
| 638 | ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) | m_bitmask); |
| 614 | 639 | } |
| 615 | 640 | |
| 616 | 641 | void ucom4_cpu_device::op_rfb() |
| r243467 | r243468 | |
| 618 | 643 | if (!check_op_43()) return; |
| 619 | 644 | |
| 620 | 645 | // RFB B: Reset a single bit of FLAG |
| 621 | | op_illegal(); |
| 646 | m_icount--; |
| 647 | ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) & ~m_bitmask); |
| 622 | 648 | } |
| 623 | 649 | |
| 624 | 650 | void ucom4_cpu_device::op_fbt() |
| r243467 | r243468 | |
| 626 | 652 | if (!check_op_43()) return; |
| 627 | 653 | |
| 628 | 654 | // FBT B: skip next on bit(FLAG) |
| 629 | | op_illegal(); |
| 655 | m_icount--; |
| 656 | m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) != 0); |
| 630 | 657 | } |
| 631 | 658 | |
| 632 | 659 | void ucom4_cpu_device::op_fbf() |
| r243467 | r243468 | |
| 634 | 661 | if (!check_op_43()) return; |
| 635 | 662 | |
| 636 | 663 | // FBF B: skip next on not bit(FLAG) |
| 637 | | op_illegal(); |
| 664 | m_icount--; |
| 665 | m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) == 0); |
| 638 | 666 | } |
| 639 | 667 | |
| 640 | 668 | |
| r243467 | r243468 | |
| 656 | 684 | if (!check_op_43()) return; |
| 657 | 685 | |
| 658 | 686 | // INM: Increment RAM, skip next on carry |
| 659 | | op_illegal(); |
| 687 | UINT8 val = (ram_r() + 1) & 0xf; |
| 688 | ram_w(val); |
| 689 | m_skip = (val == 0); |
| 660 | 690 | } |
| 661 | 691 | |
| 662 | 692 | void ucom4_cpu_device::op_dem() |
| r243467 | r243468 | |
| 664 | 694 | if (!check_op_43()) return; |
| 665 | 695 | |
| 666 | 696 | // DEM: Decrement RAM, skip next on carry |
| 667 | | op_illegal(); |
| 697 | UINT8 val = (ram_r() - 1) & 0xf; |
| 698 | ram_w(val); |
| 699 | m_skip = (val == 0xf); |
| 668 | 700 | } |
| 669 | 701 | |
| 670 | 702 | |