We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I will use the ISD51 also with the assembler. I have written a small program sequence for the ISD_INIT() macro. ------------------------------------------
$NOMOD51 #include <REG932.H> EXTRN CODE (__isd_init) cseg at 0 ljmp main cseg at 0x100 main: mov P2M1, #0 mov P2M2, #0 mov BRGR0,#0xF0 mov BRGR1,#0x02 mov BRGCON,#0x03 mov SCON,#0x52 setb EA WAIT_FOR_RI: JNB RI,WAIT_FOR_RI MOV A,SBUF XRL A,#0A5H JZ INIT_ISD CLR RI SJMP WAIT_FOR_RI INIT_ISD: LCALL __isd_init go: mov P2,#0 inc P2 ljmp go END
Build target 'Target 1' assembling P2inc.a51... assembling ISD51.A51... linking... *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: ?ISD?CORE MODULE: ISD51.obj (ISD51_CONFIGURATION) Program Size: data=9.0 xdata=0 code=684 creating hex file from "P2inc"... "P2inc" - 0 Error(s), 1 Warning(s).
The symbol ?ISD?CORE is defined within the library, C51S.LIB, which is automatically incorporated in your application only if you are using the C51 compiler. You have a couple of choices: 1) Include an empty C module in your application (i.e. 'VOID.C'). It does not require a single line of code, but this will cause the C compiler to be invoked once, thereby grabbing the needed LIB. OR 2) Manually include the library file in your application. Take a look at http://www.keil.com/support/docs/2247.htm for additional info.