Hi group, In the code below, I want to set a bit in the [INDF] => 0x30 register during each loop. The label "loop" will be executed eight times, each time I wish to do the following, using temp1 as a bit index variable. loop 1: BSF INDF,7 ;0x30 = 10000000 loop 2: BSF INDF,6 ;0x30 = 11000000 loop 3: BSF INDF,5 ;0x30 = 11100000 loop 4: BSF INDF,4 ;0x30 = 11110000 loop 5: BSF INDF,3 ;0x30 = 11111000 loop 6: BSF INDF,2 ;0x30 = 11111100 loop 7: BSF INDF,1 ;0x30 = 11111110 loop 8: BSF INDF,0 ;0x30 = 11111111 However, only BSF INDF,7 appears to work during simulation. So, is it possible? Thanks, Paul BEGIN: MOVLW 0x07 MOVWF TEMP1 LOOP MOVLW 0x30 MOVWF FSR BSF INDF,TEMP1 DECFSZ TEMP1,F GOTO NEXT_LBL2 ; -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu