Add native code emitters example.

This commit is contained in:
iabdalkader 2019-10-28 19:38:53 +02:00
parent 74876892f6
commit 6693172856

View File

@ -0,0 +1,19 @@
import time
@micropython.asm_thumb
def asm():
movw(r0, 42)
@micropython.viper
def viper(a, b):
return a + b
@micropython.native
def native(a, b):
return a + b
print(asm())
print(viper(1, 2))
print(native(1, 2))