diff python/testasm.py @ 203:ca1ea402f6a1

Added some arm instructions
author Windel Bouwman
date Sat, 15 Jun 2013 19:13:05 +0200
parents f22b431f4113
children 6c6bf8890d8a
line wrap: on
line diff
--- a/python/testasm.py	Sat Jun 15 10:02:50 2013 +0200
+++ b/python/testasm.py	Sat Jun 15 19:13:05 2013 +0200
@@ -164,8 +164,17 @@
         self.a.assemble('yield')
         self.assertEqual(bytes.fromhex('10bf'), self.a.binout)
 
+    def testSequence1(self):
+        self.a.assemble('mov r5, 3')
+        self.a.assemble('add r4, r5, 0')
+        self.a.assemble('loop: add r6, r4, 7')
+        self.a.assemble('cmp r6, 5')
+        #self.a.assemble('ble loop')
+        #self.assertEqual(bytes.fromhex('0325 2c1c e61d 052e fcdd'), self.a.binout)
+        self.assertEqual(bytes.fromhex('0325 2c1c e61d 052e'), self.a.binout) # without branch
+
 
 if __name__ == '__main__':
-    # cProfile.run('unittest.main()')
+    #cProfile.run('unittest.main()')
     unittest.main()