Example #1
0
 def test_abs_y(self):
     "Test absolute Y addressing mode"
     operands = '$4400, y'
     expected = 'abs y'
     result = oddball.parse_addr_mode(operands)
     self.assertEqual(expected, result)
Example #2
0
 def test_ind_y(self):
     "Test indirect Y addressing mode"
     operands = '($44), y'
     expected = 'ind y'
     result = oddball.parse_addr_mode(operands)
     self.assertEqual(expected, result)
Example #3
0
 def test_zp_x(self):
     "Test zero page X addressing mode"
     operands = '$44, x'
     expected = 'zp x'
     result = oddball.parse_addr_mode(operands)
     self.assertEqual(expected, result)
Example #4
0
 def test_immediate(self):
     "Test immediate addressing mode"
     operands = '#$44'
     expected = 'imm'
     result = oddball.parse_addr_mode(operands)
     self.assertEqual(expected, result)
Example #5
0
 def test_implied(self):
     "Test implied addressing mode"
     operands = ''
     expected = 'imp'
     result = oddball.parse_addr_mode(operands)
     self.assertEqual(expected, result)
Example #6
0
 def test_relative(self):
     "Test relative addressing mode"
     operands = 'test_label'
     expected = 'rel'
     result = oddball.parse_addr_mode(operands)
     self.assertEqual(expected, result)
Example #7
0
 def test_accumulator(self):
     "Test accumulator addressing mode"
     operands = 'a'
     expected = 'acc'
     result = oddball.parse_addr_mode(operands)
     self.assertEqual(expected, result)