Re: [Doxygen-users] Assembly Language
Brought to you by:
dimitri
From: Barrie D. <bar...@gm...> - 2007-06-05 09:16:18
|
I have done it once before by documenting the asm functions in a c header file. e.g. hwstuff.asm - contains normal asm with no doxygen hwstuff.h - contains all the asm function prototypes in above file commented in doxygen. I also did this as i already used a header file to export the asm symbols into the rest of my c code. The only problem with this is that if lots of code depends on the header then when u update the comments then most of the project will need to be recompiled. Regards Barrie. Relson, David wrote: >I've got an embedded project that's mostly C but has a few assembly >language files. Using "/** ... */" delimiters the C functions are >easily documented. However doxygen is not too happy with the assembly >code. > >I've got a workaround (described below) and am wondering if others have >better solutions ??? > >Regards, > >David > >My process involves creating a C skeleton from the assembly code in >several steps, i.e. > 1) converting all the assembly code to comments (by adding a "//" >prefix to each line) > 2) converting all the call opcodes to function calls (of no args) > 3) converting all the labels referenced in step 2 to function >declarations > 4) run doxygen on the resulting code > >Here's a small example: > >### test.asm (original assembly file) ### >init: > ... some assembly code > call main > >main: > ... some assembly code > call func > ... more assembly code > return > >func: > return > > >### test.asm.c (converted file) ### > >/** >* >* This function performs system initialization. >* >* @param <none> >* >* @return <none> >*/ >//init: >void init(void) >{ >// ... some assembly code >// call main > main( ); >} > >/** >* >* This function is the main program. >* >* @param <none> >* >* @return <none> >*/ >//main: >void main(void) >{ >// ... some assembly code >// call func > func( ); >// ... more assembly code >// return > return; >} > >/** >* >* This function does the work. >* >* @param <none> >* >* @return <none> >*/ >//func: >void func(void) >{ >// return > return; >} > >------------------------------------------------------------------------- >This SF.net email is sponsored by DB2 Express >Download DB2 Express C - the FREE version of DB2 express and take >control of your XML. No limits. Just data. Click to get it now. >http://sourceforge.net/powerbar/db2/ >_______________________________________________ >Doxygen-users mailing list >Dox...@li... >https://lists.sourceforge.net/lists/listinfo/doxygen-users > > > |