Nathan House writes: > I'm learning to program a PIC18 using assembly language and am curious > why there seems to be some redundancy with many instructions. Take the > MOVF instruction, for example: > > MOVLB 0x2 ;select bank 2 > MOVF 0x240, W ;move the value at 0x240 to W > > If my understanding is correct, then the "2" digit in the MOVF > instruction is ignored completely, making it redundant since the bank > is selected above. From what I've read, it seems that the assembler > automatically sets the access "a" bit based on the address when > translating to machine code, so what I'm wondering is why the > assembler doesn't automatically generate bank select instructions as > well? Well, if you access several locations in the same bank in a row, you only need to use one MOVLB (or BANKSEL) command. Emitting one before each access would halve the speed at which your program ran... Rupert --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .