def _data_int(self, value): """ Insert numeric data at the current position. """ if vm.is8(value) or vm.is8s(value): self.mem[self.position] = vm.mask8(value) self.position += 1 elif vm.is16(value): self.mem[self.position::2] = value self.position += 2 else: raise OverflowError('Value out of range: ${:X} {:d}' .format(value, value))
def test_is16_false(self): self.assertFalse(vm.is16(0x10000))
def test_is16(self): self.assertTrue(vm.is16(0xffff))