Byron A Jeff wrote: > proc clearbits(copy char count, copy char start) > while (count) > portb:start = 0 // Clear the bit in PORTB referenced by > // start. > start = start+1 > count = count-1 > endwhile > endproc > > The portb:start=0 line is a significant chunk of code because it > represents a variable bit number. But the compiler gives a compact > abstraction for the concept. Not disputing your point, but the existence of just one macro makes the assembly code even MORE compact than the high-level code: clearbits: CLRBIT portb,start inc start decfsz count goto clearbits Seems likely that most proficient PIC programmers would have a library of reusable macros and subroutines by now. -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist