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

how to bulid the cycled array and a data struct just like in the 'c'language with the asm language

hi,all.
I am assembler learner coming from china.
I know neither how to build the cycled array with the asm language,nor how to build a data struct with the asm language just like in the c
language
I wonder if you would give me ,a assembler learner , some advice.
Thanks a lot.

merry christmas.

  • The best approach is to use C for your project. The arguments for and against are well documented elsewhere.

    However, you can use the compiler to 'teach' you how to do this by writing the appropriate code in C, and converting the module to assembly with the SRC directive. Add the line

    #pragma SRC(myfile.a51)

    To the first line of your C source module, and the compiler will generate 'myfile.a51', an assembly source file ready to be processed by the A51 assembler, instead of an object module.

    Dave

  • #pragma SRC(myfile.a51)
    Note that there is no need for the filename:
    #pragma SRC
    will generate an Assembler source file with the same name as the 'C' file, and .SRC extension.

    Alternatively, just check 'Generate Assembler SRC File' in the File Properties in uVision.