We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f142f0 commit 96e37d3Copy full SHA for 96e37d3
2 files changed
tests/inlineasm/asmbcc.py
@@ -0,0 +1,27 @@
1
+# test bcc instructions
2
+# at the moment only tests beq, narrow and wide versions
3
+
4
+@micropython.asm_thumb
5
+def f(r0):
6
+ mov(r1, r0)
7
8
+ mov(r0, 10)
9
+ cmp(r1, 1)
10
+ beq(end)
11
12
+ mov(r0, 20)
13
+ cmp(r1, 2)
14
+ beq_n(end)
15
16
+ mov(r0, 30)
17
+ cmp(r1, 3)
18
+ beq_w(end)
19
20
+ mov(r0, 0)
21
22
+ label(end)
23
24
+print(f(0))
25
+print(f(1))
26
+print(f(2))
27
+print(f(3))
tests/inlineasm/asmbcc.py.exp
@@ -0,0 +1,4 @@
+0
+10
+20
+30
0 commit comments