hello,
i always get the message above, when i compile the code.
in bib.c
unsigned char bib_BcdBinAsm(unsigned char Zahl){ unsigned char temp;
#pragma ASM MOV.B R1L, R0L ;Duplizieren AND.B #0Fh,R0L ;low Ziffer abtrennen
AND.B #0F0h,R1L ;high Ziffer abtrennen SHL.B #-1,R1L ; *8 MOV.B R1L,R1H SHL.B #-2,R1L ; *2 ADD.B R1H,R1L ; *10 = *8 + *2
ADD.B R1L,R0L ;low + high Ziffer #pragma ENDASM
}
in bib.h
extern char bib_BcdBinAsm(unsigned char Zahl);#pragma PARAMETER char bib_BcdBinAsm(R0L)
Sure, because #pragma parameter defines only the input parameters to an assembler function but not the return parameter. The instruction should be
#pragma parameter bib_BcdBinAsm(R0L)
When i do so
extern unsigned char bib_BcdBinAsm(unsigned char Zahl);
#pragma PARAMETER bib_BcdBinAsm(R0L)
i get a linker error
C:\12_7000er\branches\version_0_0_128a17a\GCM7000\GCM7000_com.c(676) : Error (ln100): C:\12_7000er\branches\version_0_0_128a17a\GCM7000\Debug\GCM7000_com.r30 : '_bib_BcdBinAsm' value is undefined
regards
knut pacholke
i changed the location of the definition of the function and i get no more linker error.