Hi John, Thanks for your suggestion. Actually that was what I first came up with, but thought I should make it a little tidier. The program is quite small so space is not a problem Thanks again, Roger From: "J FLETCHER" Hi Roger, Do you even need to use RRF at all? When you read Port B into W, bits 1 to 4 contain the switch settings. AND the result with 1E to isolate the four bits you want, add this to the program counter. The resulting offsets will now be two addresses apart instead of adjacent, but this won't matter unless you're short of program space. Use NOPs to fill the gaps. Hope this helps, John -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist