2015-02-13 11:06:23 +00:00
|
|
|
@micropython.asm_thumb
|
|
|
|
def clz(r0):
|
|
|
|
clz(r0, r0)
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
|
|
|
|
print(clz(0xF0))
|
2015-02-13 11:06:23 +00:00
|
|
|
print(clz(0x8000))
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
|
2015-02-13 11:06:23 +00:00
|
|
|
@micropython.asm_thumb
|
|
|
|
def rbit(r0):
|
|
|
|
rbit(r0, r0)
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
|
|
|
|
print(hex(rbit(0xF0)))
|
2015-02-13 11:06:23 +00:00
|
|
|
print(hex(rbit(0x8000)))
|