What is uchar2fs for?

Help
2008-10-30
2013-03-12
  • Zenon Bolino

    Zenon Bolino - 2008-10-30

    Hy,

    I am assigning a byte variable(ADRESL) to a float(sample) and this is the code .
    I would like to know what is uchar2fs . What is it for ?
    ADRESL is a byte and sample is float.
    Also I am assuming that  ADRESL is set to the lower order byte (in the float sample) right ?

    _00224_DS_:
    ;    .line    237; anal.c    sample=ADRESL;
        MOVF    _ADRESL, W, ACCESS
        MOVWF    POSTDEC1, ACCESS
        CALL    ___uchar2fs
        BANKSEL    _sample
        MOVWF    _sample, BANKED
        MOVFF    PRODL, (_sample + 1)
        MOVFF    PRODH, (_sample + 2)
        MOVFF    FSR0L, (_sample + 3)
        INCF    FSR1L, F, ACCESS
        GOTO    _00216_DS_
    _00219_DS_:

    I found it in C:\Archivos de programa\SDCC\lib\large but I do not understand what is inside. This is the file

    XH
    H 19 areas 2 global symbols
    M _uchar2fs
    O -mmcs51 --model-large
    S ulong2fs_doit Ref0000
    A _CODE size 0 flags 0 addr 0
    A RSEG size 0 flags 0 addr 0
    A REG_BANK_0 size 8 flags 4 addr 0
    A DSEG size 0 flags 0 addr 0
    A OSEG size 0 flags 4 addr 0
    A ISEG size 0 flags 0 addr 0
    A IABS size 0 flags 8 addr 0
    A BSEG size 0 flags 80 addr 0
    A PSEG size 0 flags 50 addr 0
    A XSEG size 0 flags 40 addr 0
    A XABS size 0 flags 48 addr 0
    A XISEG size 0 flags 40 addr 0
    A HOME size 0 flags 20 addr 0
    A GSINIT0 size 0 flags 20 addr 0
    A GSINIT1 size 0 flags 20 addr 0
    A GSINIT2 size 0 flags 20 addr 0
    A GSINIT3 size 0 flags 20 addr 0
    A GSINIT4 size 0 flags 20 addr 0
    A GSINIT5 size 0 flags 20 addr 0
    A GSINIT size 0 flags 20 addr 0
    A GSFINAL size 0 flags 20 addr 0
    A CSEG size B flags 20 addr 0
    S ___uchar2fs Def0000
    A CONST size 0 flags 20 addr 0
    A XINIT size 0 flags 20 addr 0
    A CABS size 0 flags 28 addr 0
    T 00 00
    R 00 00 00 02
    T 00 00
    R 00 00 00 15
    T 00 00
    R 00 00 00 15
    T 00 00 E4 AC 82 FB FA F9 74 86 02 00 00
    R 00 00 00 15 02 0B 00 00

    Any help is appreciated.
    Cheers

    Zenon

     
    • treitmey

      treitmey - 2008-10-30

      from the #include <float.h>
         33

         34 /* convert unsigned char to float */
         35 float __uchar2fs (unsigned char uc) _FS_REENTRANT
         36 {
         37   return __ulong2fs(uc);
         38 }

       
    • Zenon Bolino

      Zenon Bolino - 2008-11-02

      Thanks

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks