Up to now there is no response from Apexmic.
But in a german forum the basic usage of the FPU have been decoded with disassembling of the library
sc_math.lib from the SDK
Code: Select all
Ok, 32-Bit-Float,
5 32-Bit-Register:
0: Opcode
1: Status, Bit0: Busy
2: Result
3: Op1
4: Op2
Opcodes:
1: asin
3: acos
5: atan
7: atan2
9: sin
11: cos
13: tan
...
289: fadd
293: fsub
295: fmul
45: fdiv
...
and the example
Code: Select all
00000000 <sc_math_sin>:
0: 4601 mov r1, r0
2: 2009 movs r0, #9
4: 4afe ldr r2, [pc, #1016] ; (400 <__wrap___ltsf2+0x2a>)
6: 6010 str r0, [r2, #0]
8: 4610 mov r0, r2
a: 60c1 str r1, [r0, #12]
c: bf00 nop
e: 48fc ldr r0, [pc, #1008] ; (400 <__wrap___ltsf2+0x2a>)
10: 6840 ldr r0, [r0, #4]
12: f000 0001 and.w r0, r0, #1
16: 2800 cmp r0, #0
18: d0f9 beq.n e <sc_math_sin+0xe>
1a: 48f9 ldr r0, [pc, #996] ; (400 <__wrap___ltsf2+0x2a>)
1c: 6880 ldr r0, [r0, #8]
1e: 4770 bx lr
at:
400: 40024000 .word 0x40024000
is the base address of the FPU hardware.