comparison python/target.py @ 249:e41e4109addd

Added current position arrow
author Windel Bouwman
date Fri, 26 Jul 2013 20:26:05 +0200
parents 8786811a5a59
children 6f2423df0675
comparison
equal deleted inserted replaced
248:b10d46e5c8dd 249:e41e4109addd
84 84
85 85
86 class Comment(PseudoInstruction): 86 class Comment(PseudoInstruction):
87 def __init__(self, txt): 87 def __init__(self, txt):
88 self.txt = txt 88 self.txt = txt
89
89 def encode(self): 90 def encode(self):
90 return bytes() 91 return bytes()
92
91 def __repr__(self): 93 def __repr__(self):
92 return '; {}'.format(self.txt) 94 return '; {}'.format(self.txt)
93 95
94 96
95 class Alignment(PseudoInstruction): 97 class Alignment(PseudoInstruction):
105 while (address % self.align) != 0: 107 while (address % self.align) != 0:
106 address += 1 108 address += 1
107 pad.append(0) 109 pad.append(0)
108 return bytes(pad) 110 return bytes(pad)
109 111
112 class DebugInfo(PseudoInstruction):
113 def __init__(self, i):
114 self.info = i
115
116 def __repr__(self):
117 return 'DebugInfo: {}'.format(self.info)
118
119 def encode(self):
120 return bytes()
110 121
111 class Register(Operand): 122 class Register(Operand):
112 def __init__(self, name): 123 def __init__(self, name):
113 self.name = name 124 self.name = name
114 125