def test_assembles_07_65c02(self): mpu = MPU65C02() self.assertEqual([0x07, 0x42], self.assemble('RMB0 $42', 0x0000, mpu))
def test_assembles_9e_65c02(self): mpu = MPU65C02() self.assertEqual([0x9e, 0x34, 0x12], self.assemble('STZ $1234,X', 0x0000, mpu))
def test_assembles_b2_65c02(self): mpu = MPU65C02() self.assertEqual([0xb2, 0x44], self.assemble('LDA ($44)', 0x0000, mpu))
def test_disassembles_7c_65c02(self): mpu = MPU65C02() length, disasm = self.disassemble([0x7c, 0x34, 0x12], 0x0000, mpu) self.assertEqual(3, length) self.assertEqual('JMP ($1234,X)', disasm)
def test_assembles_34_65c02(self): mpu = MPU65C02() self.assertEqual([0x34, 0x44], self.assemble('BIT $44,X', 0x0000, mpu))
def test_assembles_0c_65c02(self): mpu = MPU65C02() self.assertEqual([0x0c, 0x34, 0x12], self.assemble('TSB $1234', 0x0000, mpu))
def test_assembles_f7_65c02(self): mpu = MPU65C02() self.assertEqual([0xf7, 0x42], self.assemble('SMB7 $42', 0x0000, mpu))
def test_assembles_72_65c02(self): mpu = MPU65C02() self.assertEqual([0x72, 0x44], self.assemble('ADC ($44)', 0x0000, mpu))
def test_assembles_74_65c02(self): mpu = MPU65C02() self.assertEqual([0x74, 0x44], self.assemble('STZ $44,X', 0x0000, mpu))
def test_assembles_5a_65c02(self): mpu = MPU65C02() self.assertEqual([0x5a], self.assemble('PHY', 0x0000, mpu))
def test_assembles_64_65c02(self): mpu = MPU65C02() self.assertEqual([0x64], self.assemble('STZ', 0x0000, mpu))
def test_assembles_52_65c02(self): mpu = MPU65C02() self.assertEqual([0x52, 0x44], self.assemble('EOR ($44)', 0x0000, mpu))
def test_assembles_3c_65c02(self): mpu = MPU65C02() self.assertEqual([0x3c, 0x34, 0x12], self.assemble('BIT $1234,X', 0x0000, mpu))
def test_assembles_3a_65c02(self): mpu = MPU65C02() self.assertEqual([0x3a], self.assemble('DEC', 0x0000, mpu))
def test_assembles_cb_65c02(self): mpu = MPU65C02() self.assertEqual([0xcb], self.assemble('WAI', 0x0000, mpu))
def test_assembles_7c_65c02(self): mpu = MPU65C02() self.assertEqual([0x7c, 0x34, 0x12], self.assemble('JMP ($1234,X)', 0x0000, mpu))
def test_assembles_d2_65c02(self): mpu = MPU65C02() self.assertEqual([0xd2, 0x42], self.assemble('CMP ($42)', 0x0000, mpu))
def test_assembles_80_65c02(self): mpu = MPU65C02() self.assertEqual([0x80, 0x44], self.assemble('BRA $0046', 0x0000, mpu))
def test_assembles_f2_65c02(self): mpu = MPU65C02() self.assertEqual([0xf2, 0x42], self.assemble('SBC ($42)', 0x0000, mpu))
def test_assembles_89_65c02(self): mpu = MPU65C02() self.assertEqual([0x89, 0x42], self.assemble('BIT #$42', 0x0000, mpu))
def test_assembles_fa_65c02(self): mpu = MPU65C02() self.assertEqual([0xfa], self.assemble('PLX', 0x0000, mpu))
def test_assembles_04_65c02(self): mpu = MPU65C02() self.assertEqual([0x04, 0x42], self.assemble('TSB $42', 0x0000, mpu))
def test_disassembles_07_65c02(self): mpu = MPU65C02() length, disasm = self.disassemble([0x07, 0x42], 0x0000, mpu) self.assertEqual(2, length) self.assertEqual('RMB0 $42', disasm)
def test_assembles_1a_65c02(self): mpu = MPU65C02() self.assertEqual([0x1a], self.assemble('INC', 0x0000, mpu))