As I use inline assembler in my C program, I have to include the related C library in my project. If the project is configured to 22-bit contiguous mode & dual DPTRs of DS80C390, can you tell me which C library should be included ? Thks.
CD51*.lib. See also: http://www.keil.com/support/man/docs/c51/c51_lib_files.htm Reinhard
As I use inline assembler in my C program, I have to include the related C library in my project. That conclusion is a bit premature. You only have to include the C libraries manually if you compile all C files of the entire project via assembler output. The easy fix is not to do that: don't turn on compilation via the .src detour for all files, but only for those that actually need it. If necessary, you may add an otherwise empty .c source file to the project just for this purpose. If you actually do have inline assembly in every single one of your .c files, that's a likely symptom of tool abuse --- you should probably just have written the entire thing in assembly then, or at least have organized the source code a bit better.
Due to special assembler coding sequence required for FLASH memory access in our MCU, I use inline assembler in these functions. And, these functions are grouped in a C source file. Since the source file contains inline assembler, the "generate assembler SRC file" & "assemble SRC file" options are enabled. Since the parameters of these functions contain 22-bit address pointer, the related library functions are called. Since this library file should be specified manually, that's why I ask for the name of the library. Is there better solution to handle this problem ?
I think you need just to access absolute memory locations. Take a look to: http://www.keil.com/support/docs/2172.htm Reinhard
Since the source file contains inline assembler, the "generate assembler SRC file" & "assemble SRC file" options are enabled. You didn't get it. The important question is not whether these are turned on or not, it's where you turn them on. They should only be active for this particular source file, not for the entire project. The C standard library normally doesn't have to specified by hand. You created that need yourself by compiling all C files with those options, instead of only those that actually need them. That makes the project look like a "100% assembler" program to the linker, so it correctly decided not to pull in the C runtime automatically.