Ejemplo n.º 1
0
void Tester_68k::sampleMove() {
    Results* oObj;
    MemoryBlock* oSampleMem;

    oObj = new Results("MOVE.B D1, D2");
    oObj->setRegD(1, 0x12345678);
    oObj->setRegD(2, 0x78);
    oObj->setCycleCount(4);

    oObj = new Results("MOVE.L #$8090fea1, D2");
    oObj->setRegD(2, 0x8090fea1);
    oObj->setN();
    oObj->setCycleCount(12);

    oObj = new Results("MOVE #$0, (A2)");
    oObj->setRegA(2, 0x3000);
    oObj->setZ();
    oSampleMem = new MemoryBlock();
    oSampleMem->writeWord(0x3000, 0);
    oObj->setCodeBlock(oSampleMem);
    oObj->setCycleCount(12);

    oObj = new Results("MOVE.L (A2)+, (A2)+");
    oObj->setRegA(2, 0x3008);
    oObj->setN();
    oSampleMem = new MemoryBlock();
    oSampleMem->writeLong(0x3000, 0xaaaabbbb);
    oSampleMem->writeLong(0x3004, 0xaaaabbbb);
    oObj->setCodeBlock(oSampleMem);
    oObj->setCycleCount(20);

    oObj = new Results("MOVE.L (A2)+, -(A2)");
    oObj->setRegA(2, 0x3000);
    oObj->setN();
    oSampleMem = new MemoryBlock();
    oSampleMem->writeLong(0x3000, 0xaaaabbbb);
    oSampleMem->writeLong(0x3004, 0x0);
    oObj->setCodeBlock(oSampleMem);
    oObj->setCycleCount(20);

    oObj = new Results("MOVE.L -(A2), 4(A2,D1)");
    oObj->setRegA(2, 0x3000);
    oObj->setRegD(1, 0);
    oObj->setN();
    oSampleMem = new MemoryBlock();
    oSampleMem->writeLong(0x3000, 0xaaaabbbb);
    oSampleMem->writeLong(0x3004, 0xaaaabbbb);
    oObj->setCodeBlock(oSampleMem);
    oObj->setCycleCount(28);

    oObj = new Results("MOVE.W D1, ($3000).L");
    oObj->setRegD(1, 0x5678);
    oSampleMem = new MemoryBlock();
    oSampleMem->writeWord(0x3000, 0x5678);
    oSampleMem->writeWord(0x3002, 0);
    oObj->setCodeBlock(oSampleMem);
    oObj->setCycleCount(16);

    oObj = new Results("MOVE.L ($3000).L, ($3004).L");
    oSampleMem = new MemoryBlock();
    oSampleMem->writeLong(0x3000, 0xeeee);
    oSampleMem->writeLong(0x3004, 0xeeee);
    oObj->setCodeBlock(oSampleMem);
    oObj->setCycleCount(36);

}