Is it possible to configure LCLint to recognize special syntactical
constructs that are used by C compilers for small, embedded micros?



For example, the following line specifies that temp_STATUS is to be located
at address 0x0023.
------------------------------------------
char temp_STATUS   @ 0x23;
------------------------------------------



This construct designates a function as being an interrupt service routine,
signalling the compiler to generate different function entry and exit code
(like an "iret" instruction instead of a "ret" instruction):
------------------------------------------
interrupt void SomeISR()
        {
        ....
        };
------------------------------------------



Also, inline assembly is often encountered:
------------------------------------------
#asm 
        org 4
        movwf temp_WREG       ; goes to 0x20 or 0xA0  0004h
        swapf STATUS,W        ;                       0005h
        clrf  STATUS          ;                       0006h
        movwf temp_STATUS     ; Save STATUS           0007h
        movf  PCLATH,W        ;                       0008h
        movwf temp_PCLATH     ; Save PCLATH           0009h
        clrf  PCLATH          ; Clear PCLATH          000Ah
#endasm
------------------------------------------


In every case I can think of at the moment, the modified syntax can be dealt
with by simply ignoring the special text. Sure, I could create a
pre-pre-processor to strip out the special stuff, but there's got to be an
easier way.....?


Phil Schmidt
Omni Engineering Services, Inc.
1510 E. Sanborn St.
P.O. Box 132
Winona, MN 55987
Phone:  (507) 454-5293 x126
FAX:    (507) 453-0922
e-mail: [EMAIL PROTECTED]
Web:    http://www.omniminnesota.com

Reply via email to