My first thought was to rotate MEM1 into w, then copy it to MEM2 and rotate it three more times, then rotate MEM1 four times. That takes 9 instructions. I then remembered the SWAPF instruction, and used it to remove one instruction for the above. My second inclination is to: MEM1 MEM2 W 0xAB unk unk MOVF MEM1,W ; W = MEM1 0xAB unk 0xAB ANDLW 0xf0 ; W = W[7:4] 0xAB unk 0xA0 MOVWF MEM2 ; Move that to MEM2. MEM2 = MEM1[7:4] 0xAB 0xA0 0xA0 SWAPF MEM2,f ; MEM2[3:0] = MEM1[7:4] 0xAB 0x0A 0xA0 MOVF MEM1,W ; W = MEM1 0xAB 0x0A 0xAB ANDLW 0xf ; W = W[3:0] 0xAB 0x0A 0x0B MOVWF MEM1 ; Move that to MEM1. 0x0B 0x0A 0x0B SWAPF MEM1,f ; MEM1 = MEM1[3:0] << 4 0xB0 0x0A 0x0B Actually, let's use the swapf instruction to put MEM1 into w, instead of a seperate instruction: MEM1 MEM2 W 0xAB unk unk SWAPF MEM1, W 0xAB unk 0xBA ANDLW 0x0F 0xAB unk 0x0A MOVWF MEM2 0xAB 0x0A 0x0A SWAPF MEM1, W 0xAB 0x0A 0xBA ANDLW 0xF0 0xAB 0x0A 0xB0 MOVWF MEM1 0xB0 0x0A 0xB0 I think that would be the shortest routine one could use to do what you are trying to do, unless you can somehow load w at the beginning, and use ANDWF to replace to two ANDLW/MOVWF combinations. I've thought about it and can't see the way, but perhaps it is possible. You'd only gain one instruction cycle by doing that, anyway. -Adam PDRUNEN@AOL.COM wrote: > > Hi Group, > > I have a memory location I need to break up into two different register. > > If MEM1 = $32 then MEM2 gets $03 and MEM3 gets $20 for $0320 > if MEM1 + $14 then MEM2 gets $01 and MEM3 gets $40 for $0140 > > I am basically multiplying by 16 (decimal), I see several ways myself but > would > like to see what the group can come up with. > > Paul