circuitpython/tests/inlineasm/asmconst.py
Damien George ea8be373a9 py/inlinethumb: Remove 30-bit restriction on movwt instruction.
movwt can now move a full 32-bit constant into a register.
2016-01-07 16:34:11 +00:00

9 lines
153 B
Python

# test constants in assembler
@micropython.asm_thumb
def c1():
movwt(r0, 0xffffffff)
movwt(r1, 0xf0000000)
sub(r0, r0, r1)
print(hex(c1()))