Hi again ! Thanks for the reply and sample code ! I would like to start out by telling about my assembler experience - i have read and understood Easy PIC'n by david benson and played alot around (so far sucessfully) thats all I cant seem to find some of the instructions you use in my list: These are: PCL , PCLATH As far as i understand from the PIC memory map the PCLATH is some kind of address table which (please correct me if im wrong - which i probertly am) is a better way of writing Tris right ? PCL now thats more tricky because i cant seem to find any reference to this command anywhere Im most sorry that i didnt specify that the Target PIC is a 12C509A this is ofcause a vital information. but how ever if the code cant be executed on the target please let me know as the 16C54 would be fine also. Im not totally sure about your code, lets assume again that the target is the 12C509A and i initialize it as is: portb equ 0x06 org 0x000 start movlw b'111100' tris portb As we can see the we have the 4 input ports assigned and 2 output ports. As im not totally aware of the functions of your code i "allow" my self to ask these stupid questions: movlw high tb ; doesnt "high" or "tb" need to be assigned as an equate some where or is this some kind of special assembler command ? movwf PCLATH movf PORTB,W ; Will this work when theres output ports assigned on portb also ? andlw 15 ; this i understand :) tb addwf PCL,F ; But ! which bits are MSB and LSB ??? - sorry for asking stupid ! goto target0000 ; this i understand :) ... I thank you alot for the code you wrote and hope that you will help me get on with assembler. Best regards Lasse Madsen -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.