[go: up one dir, main page]

Menu

[r813]: / src / lib / float / itof.c  Maximize  Restore  History

Download this file

17 lines (13 with data), 400 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#include "_float.h"
asm float_t* _itof(int src, float_t* dst)
{
asm {
pshs u
ldd 4,s
jsr _GIVABF // CONVERT THE VALUE IN ACCD INTO A FLOATING POINT NUMBER IN FPA0
ldx 6,s
jsr _LBC35 // PACK FPA0 AND MOVE IT TO ADDRESS IN X
puls u
ldd 4,s
}
}