Hi all, I have just started learning asm and playing around with a 16f84. I've already read a couple of tutorials from the net and now have a question. How do I create a function that uses a bit orientated command and pass its arguments via a register. I have included a small piece of code to try and illustrate. #include "p16f84.inc" #DEFINE PAGE0 bcf STATUS,5 #DEFINE PAGE1 bsf STATUS,5 RBpin equ 0x0C ; Port B pin number org 4 goto start start clrf PORTB ; clear portb PAGE1 ; select bank 1 clrf PORTB ; portb all output's PAGE0 ; select bank 0 loop movlw 0 ; bit 0 portb movwf RBpin ; move bit select into register call foobar ; test function goto loop foobar bsf PORTB,RBpin return END When I compile this I get the error "Argument out of range. Least significant bits used". I guess this is because bsf expects a single bit arg but I pass it a byte. I tried loading W with my bit number and then read W from within my function which worked fine, but if I need to pass 2 args I can't use W as one arg overwrites the other. Any suggestions ? Thanks Russell.