I had a play with a 16C84 several years ago and I now need to make it do something. I am a real PIC beginner. My simple programming question is how do I represent a byte out to the PORTB of the 84. It seems my restriction is using a variable in the bsf op code. I manually did it by doing each bit but I am sure there is a more elegant way of doing it through a loop. I am using gpasm-0.9.14 alpha (Linux) to assemble my code. movlw 0x01 subwf TmpByte,w btfsc STATUS, Z bsf PORTB,0 movlw 0x02 subwf TmpByte,w btfsc STATUS, Z bsf PORTB,1 ...... movlw 0x80 subwf TmpByte,w btfsc STATUS, Z bsf PORTB,7 -- Daryl Sayers Corinthian Engineering Ph: (02) 9906 7866 Suite 19, 401 Pacific Hwy Fax: (02) 9906 1556 Artarmon, NSW, 2064 email: daryl@ci.com.au Australia www: http://www.cordoors.com.au -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body