1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-18 03:29:32 +00:00
SixtyPical/src/sixtypical/model.py
Chris Pressey dd4c50fc50 Refactor to replace some sketchy code with code actually in use.
--HG--
rename : src/sixtypical/objects.py => src/sixtypical/model.py
2015-10-16 10:40:38 +01:00

31 lines
569 B
Python

"""Data/storage model for SixtyPical."""
class LocationRef(object):
def __init__(self, name):
self.name = name
def __repr__(self):
return 'LocationRef(%r)' % self.name
class ConstantRef(object):
def __init__(self, value):
self.value = value
def __repr__(self):
return 'ConstantRef(%r)' % self.value
# TODO type=byte
REG_A = LocationRef('a')
REG_X = LocationRef('x')
REG_Y = LocationRef('y')
# TODO type=bit
FLAG_Z = LocationRef('z')
FLAG_C = LocationRef('c')
FLAG_N = LocationRef('n')
FLAG_V = LocationRef('v')