comparison python/testasm.py @ 212:62386bcee1ba

Added parser combinator lib
author Windel Bouwman
date Sun, 30 Jun 2013 19:00:41 +0200
parents 8b2f20aae086
children 494828a7adf1
comparison
equal deleted inserted replaced
211:99164160fb0b 212:62386bcee1ba
176 176
177 def testPop(self): 177 def testPop(self):
178 self.feed('pop {r4-r6, pc}') 178 self.feed('pop {r4-r6, pc}')
179 self.check('70bd') 179 self.check('70bd')
180 180
181 def testStr5(self):
182 self.feed('str r4, [r1 + 0]')
183 self.check('0c60')
184
185 def testLdr5(self):
186 self.feed('ldr r4, [r0 + 0]')
187 self.check('0468')
188
181 def testSequence1(self): 189 def testSequence1(self):
182 self.feed('mov r5, 3') 190 self.feed('mov r5, 3')
183 self.feed('add r4, r5, 0') 191 self.feed('add r4, r5, 0')
184 self.feed('loop: add r6, r4, 7') 192 self.feed('loop: add r6, r4, 7')
185 self.feed('cmp r6, 5') 193 self.feed('cmp r6, 5')