This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

asm c variable to a assembler register

hi i start a new try.
i am looking for a solution that uVision4 accept to put Variables(Parameters) of c-Code in to Asssembler Registers.

A reference to the "C166 User's Guide - Reference ASM" helped my not because this(my) problem isnot treated!

------------------------------------------------------------------------------------


_inline int vf_control( int offset, int slew, int anglespeed)
{
        int retvalue;

#pragma asm     ( @w1=offset, @w2=slew, @w3=anglespeed, @4,@5 )


        mov     MCW,#0600H

        mov     @5,ZEROS

        CoMUL   @w2,@w3

        CoSHL   #8

        CoADD   @5, @w1

        CoSTORE @4,MAS

#pragma endasm (retvalue = @4 )
        return retvalue;
}

Parents
  • you need to understand that the Tasking and Keil implementation of the 166-tools is completely different: Tasking - EXTEND2 --> Keil - MODV2; uVision will never accept EXTEND2.

    The next problem will be with all those @SET(...), @_CALL(...) etc. macros used in the assembly language file. This needs to be converted to use the Keil macro format. Also 'LDAT' needs to be converted.

    I would suggest to use c:\keil\c166\lib\Start_v3.a66 as a reference for porting, this is the standard startup file used by uVision when creating a XExxx application.

Reply
  • you need to understand that the Tasking and Keil implementation of the 166-tools is completely different: Tasking - EXTEND2 --> Keil - MODV2; uVision will never accept EXTEND2.

    The next problem will be with all those @SET(...), @_CALL(...) etc. macros used in the assembly language file. This needs to be converted to use the Keil macro format. Also 'LDAT' needs to be converted.

    I would suggest to use c:\keil\c166\lib\Start_v3.a66 as a reference for porting, this is the standard startup file used by uVision when creating a XExxx application.

Children