diff python/asm.py @ 203:ca1ea402f6a1

Added some arm instructions
author Windel Bouwman
date Sat, 15 Jun 2013 19:13:05 +0200
parents 5e391d9a3381
children 6c6bf8890d8a
line wrap: on
line diff
--- a/python/asm.py	Sat Jun 15 10:02:50 2013 +0200
+++ b/python/asm.py	Sat Jun 15 19:13:05 2013 +0200
@@ -160,10 +160,11 @@
             raise CompilerError('Cannot assemble without target')
         while self.output:
             vi = self.output.pop(0)
-            ri = self.target.mapInstruction(vi)
-            b = ri.encode()
-            assert type(b) is bytes
-            self.binout.extend(b)
+            if type(vi) is AInstruction:
+                ri = self.target.mapInstruction(vi)
+                b = ri.encode()
+                assert type(b) is bytes
+                self.binout.extend(b)
 
     def back_patch(self):
         """ Fix references to earlier labels """