Hi all, I've been wondering if there is an easier way to code assembler loops (i.e. the repetition of a section of the program, which would get unrolled at compile time). I know I can code the loop for the PIC to execute, but I'd rather not waste time messing around with INDF/FSR and a loop variable, since that wastes time and I've got plenty of space in program memory. Previously I've been doing this: VARIABLE i=0 WHILE i<7 ; code here VARIABLE i=i+1 ENDW Which is fine (although I'd appreciate it if there is an easier way of doing it.) The problem comes when using labels inside the loop, since the assembler doesn't like the repeated labels, and the LOCAL stuff can only be used inside a macro (yes, I could code everything into a macro and then put the macro into the loop, but that would be even more confusing). So I end up doing things like $+5, which is evil and hard to maintain. Is there a better way of doing this? Like mangling label names with the i variable or something? -- Hector Martin (hector@marcansoft.com) Public Key: http://www.marcansoft.com/hector.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist