On Sun, 17 Mar 2002, M. Adam Davis wrote: > This is excellent! It took me about 15 minutes to get set up (after > realizing that it needed gpasm - thank goodnes for clear error > messages!) and compile my first program: > // Test file for SDCC > > char testfunc(char y); > > void main(void) > { > char x; > x = 'A'; > > x++; > > if(x == 'B') > { > x = testfunc(5); > } > } > > char testfunc(char y) > { > y += 3; > return y; > } > > It did an optimization of the conditional (ie, it set x = 5, then called > the test function) so the entire asm was 5k - but only 5 of which were > actual PIC code ;-) And the version you have has the pCode peep hole optimizer disabled, otherwise your program would've taken negative instructions! BTW, those verbose debugging messages in the .asm will be gone by the time 2.4.0 is released. Also, if you want to use MPASM instead of gpasm then do this: sdcc -S -mpic14 file.c The -S will compile only and generate "file.asm". Then a .hex and .cod file can be generated with MPASM. > > I'm anxious to try some of the CC5X files on it and seeing how much I > need to change. I have a few questions about implementation, but I'll > ask them tomorrow, probably off list (maybe pettition the list admins to > make an SDCC topic?)... Sounds good. I hope the rest of the testing goes as smoothly as your initial setup! Scott -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu