Skip to main content
Visitor II
March 17, 2006
Question

assembly code for a function with passing param and return value

  • March 17, 2006
  • 5 replies
  • 1143 views
Posted on March 17, 2006 at 05:48

assembly code for a function with passing param and return value

    This topic has been closed for replies.

    5 replies

    sjayapalAuthor
    Visitor II
    March 16, 2006
    Posted on March 16, 2006 at 08:54

    Hi,

    Micro used: ST7FL35

    Compiler and Assembler used: Cosmic

    Memory Model used: MODMM

    Does anyone have a sample assembly code for writing a function with 2 passing parameters and with a return value and made as global so that it could be called in one other file ????

    Thanks,

    Suganya

    [ This message was edited by: Suganya on 16-03-2006 14:46 ]

    Visitor II
    March 16, 2006
    Posted on March 16, 2006 at 09:58

    You can write a sample function in C, see the asm produced by the compiler for that, and go on from there.

    Regards,

    Luca

    sjayapalAuthor
    Visitor II
    March 16, 2006
    Posted on March 16, 2006 at 10:44

    Luca,

    As suggested i wrote a sample C code and tried using the asm code in my assembly file but i get the following error in it.

    symbol _Check_Sample_Assembly$L not defined (Debug\timer.o Debug\cstartup.o )

    I have attached my project, kindly let me know how to write a assembly routine to pass arguments when the memory model is modmm ????

    Regards,

    Suganya.

    [ This message was edited by: Suganya on 16-03-2006 15:17 ]

    ________________

    Attachments :

    Luca.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Ct&d=%2Fa%2F0X0000000bWZ%2FNf5lfaZ03PldZnGliXqaNQC2dsjwAWTv6xBGNFcvS18&asPdf=false
    sjayapalAuthor
    Visitor II
    March 17, 2006
    Posted on March 17, 2006 at 02:39

    Can anyone give a help on this !

    Thanks in advance.

    Suganya

    sjayapalAuthor
    Visitor II
    March 17, 2006
    Posted on March 17, 2006 at 05:48

    I have analysed that shared sections ($L) are not getting created for the assembly code.

    Any clue???

    -Suganya