From: karthik b. g. <sdc...@ya...> - 2003-01-23 17:04:14
|
I got it solved this way. I put the various assembly routines in terms of 'C' routines in a C file and got it included in to the C file in which i want to call that assembly routine. karthik bala guru --- Robin Singh <net...@et...> wrote: > Greetings. > > If there are routines defined in a .src file (let's > call it .asm for a > moment), these can be called from other routines > defined in the .c file. > > The .asm and the .c files are assembled and compiled > (respectively), > individually and the generated objects are linked > together thus allowing > global symbols in either file to be utilised by > anyone. > > Care has to be taken for parameter passing and > return values since specific > registers need to be used for the same. > > Another point (specific to the other mail you sent) > is that if there are > global variables in the .c file they need to be > referenced in the .asm using > the # directive. > > So a global variable called "_read_the_dox" in a .c > file would be referenced > as: > mov a, #_read_the_dox > in the .asm. > > As always this is amply described in the sdcc and > the aslink documentation. > > Regards. > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |