How about something like: hangaround bcfss PIR1bits, SSPIFbit goto hangaround Regards, Mark > Hi there, > > I am trying to generate some more efficient code from my C routines. I > have found that the following type of while loop, which is hanging > around until a bit is set generates about ten lines of code. > > While (PIR1bits.SSPIF==0); > > It is possible to do this in assembler with two lines - anyone know a > way of writing this in C so that it doesn't waste so much space? > > Any other tips on shrinking C code that anyone has discovered would be > much appreciated! > > Best Regards, > > Mike Griffin > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body