2019-10-22 07:33:23 +01:00
|
|
|
import uarray as array
|
2020-03-23 02:26:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
@micropython.asm_thumb # test vldr, vstr
|
2015-04-14 13:14:57 +01:00
|
|
|
def arrayadd(r0):
|
|
|
|
vldr(s0, [r0, 0])
|
2015-10-31 09:38:22 +00:00
|
|
|
vldr(s1, [r0, 4])
|
2015-04-14 13:14:57 +01:00
|
|
|
vadd(s2, s0, s1)
|
2015-10-31 09:38:22 +00:00
|
|
|
vstr(s2, [r0, 8])
|
2015-04-14 13:14:57 +01:00
|
|
|
|
2020-03-23 02:26:08 +00:00
|
|
|
|
2015-04-14 13:14:57 +01:00
|
|
|
z = array.array("f", [2, 4, 10])
|
|
|
|
arrayadd(z)
|
|
|
|
print(z[2])
|