On Thu, 22 Jan 1998 18:02:20 +0100 Giorgio Alboni writes: >I'm writing a C compiler fo microchip 16C84. The output is a full >commented >MPLAB assembler file. I just made the parser and a part of compiler. >Give a look at this code (c -> asm) and tell me what do you think. That looks pretty neat! The case where you're setting a variable to zero could be a special case. Instead of using movlw 0, movwf variable, you could just do clrf variable. Also, where is the variable memory allocation being done? In writing asm code, I tend to do it inside the subroutine using cbank and endc. If no address is given for the cbank, it uses the next available address. Then there's the issue of ram re-use. I generally haven't dealt with it, but local automatic variables could be released from ram on exit of the subroutine (easy with a stack... but we don't have one unless you want to build one using FSR). I'd like to see the compiler. Is it available on the web? If not, you can email it to me at harold@hallikainen.com . Thanks! Harold _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]