Mercurial > lcfOS
comparison python/testasm.py @ 237:81752b0f85a5
Added burn led test program
author | Windel Bouwman |
---|---|
date | Wed, 17 Jul 2013 22:31:54 +0200 |
parents | 8786811a5a59 |
children | 90637d1bbfad |
comparison
equal
deleted
inserted
replaced
236:8786811a5a59 | 237:81752b0f85a5 |
---|---|
210 def testStrSpRel(self): | 210 def testStrSpRel(self): |
211 self.feed('str r0, [sp + 4]') | 211 self.feed('str r0, [sp + 4]') |
212 self.check('0190') | 212 self.check('0190') |
213 | 213 |
214 def testLdrPcRel(self): | 214 def testLdrPcRel(self): |
215 self.feed('ldr r7, henkie') | |
216 self.feed('ldr r6, henkie') | |
215 self.feed('ldr r1, henkie') | 217 self.feed('ldr r1, henkie') |
216 self.feed('align 4') | 218 self.feed('align 4') |
217 self.feed('dcd 1') | 219 self.feed('dcd 1') |
218 self.feed('henkie: dcd 2') | 220 self.feed('henkie: dcd 2') |
219 self.check('014900000100000002000000') | 221 self.check('024F024E 01490000 01000000 02000000') |
222 | |
223 def testBranch(self): | |
224 self.feed('start: b henkie') | |
225 self.feed('beq henkie') | |
226 self.feed('bne henkie') | |
227 self.feed('henkie: b start') | |
228 self.feed('eof: b eof') | |
229 self.check('01e000d0 ffd1fbe7 fee7') | |
230 | |
231 def testBoff(self): | |
232 self.feed('b henkie') | |
233 self.feed('b henkie') | |
234 self.feed('b henkie') | |
235 self.feed('b henkie') | |
236 self.feed('b henkie') | |
237 self.feed('b henkie') | |
238 self.feed('b henkie') | |
239 self.feed('henkie:') | |
240 self.feed('b henkie') | |
241 self.feed('b henkie') | |
242 self.feed('b henkie') | |
243 self.feed('b henkie') | |
244 self.check('05e004e0 03e002e0 01e000e0 ffe7fee7 fde7fce7 fbe7') | |
220 | 245 |
221 def testCmpRegReg(self): | 246 def testCmpRegReg(self): |
222 self.feed('cmp r0, r1') | 247 self.feed('cmp r0, r1') |
223 self.check('8842') | 248 self.check('8842') |
224 | 249 |