Mercurial > lcfOS
comparison test/testmsp430asm.py @ 341:4d204f6f7d4e devel
Rewrite of assembler parts
author | Windel Bouwman |
---|---|
date | Fri, 28 Feb 2014 18:07:14 +0100 |
parents | 582a1aaa3983 |
children | 86b02c98a717 |
comparison
equal
deleted
inserted
replaced
340:c7cc54c0dfdf | 341:4d204f6f7d4e |
---|---|
15 self.t = msp430target | 15 self.t = msp430target |
16 self.obj = ObjectFile() | 16 self.obj = ObjectFile() |
17 self.o = outstream.BinaryOutputStream(self.obj) | 17 self.o = outstream.BinaryOutputStream(self.obj) |
18 self.o.selectSection('.text') | 18 self.o.selectSection('.text') |
19 self.a = Assembler(target=self.t, stream=self.o) | 19 self.a = Assembler(target=self.t, stream=self.o) |
20 | |
21 def testMapMovInstruction(self): | |
22 i = AInstruction('mov', [ASymbol('r14'), ASymbol('r15')]) | |
23 ri = self.t.mapInstruction(i) | |
24 | |
25 def testMapRetiInstruction(self): | |
26 i = AInstruction('reti', []) | |
27 ri = self.t.mapInstruction(i) | |
28 | 20 |
29 def testMov(self): | 21 def testMov(self): |
30 self.feed("mov r14, r15") | 22 self.feed("mov r14, r15") |
31 self.check('0F4E') | 23 self.check('0F4E') |
32 | 24 |