Some explanations:
1.bsf status,5 Set bit 5 in the STATUS register. You will have to find out what bit 5 “is or does”
movlw B'00011000 move the binary number (called a Literal) into the working register (called w) In other words “set bits three and four.”
movew trisa move the value in the tris register (the register that determines if each of the bits on an input/output port will be an input or an output) into the working register (w)
2.Movlw 00 move zero into the working register. In other words clear or zero the working register. This is how the values for a program are created. This instruction means to get a value "out of thin air" and load (put) it into the working register. This is how you create a number. From here you can transfer (put) or (load) the number (called a Literal) into another register (or file).
movewf trisb move (actually COPY) the value in w to the TRIS register (also called FILE)
bcf status 5 clear bit 5 of the STATUS register
3.Clrf porta Clear or ZERO the (input/output) port (PORTA)
movf porta,0 moves the data in port A in and output of port A and also leaves a copy in the w register.
movwf portb move (copy) the contents of w and send it to the in/out port Port B
end tells the assembler that this is the end of the program you have created.
4. incf counter increment a register or file that you have called “COUNTER” You need to put ,0 or ,1 like this: incf counter,0 incf counter,1 to let the assembler know where to put the result. If it is incf counter,0 the result is in COUNTER file and also in W If it is incf counter,1 the result is in COUNTER file but not in W
andlw 07 perform a LOGIC “AND” with the value 7 and the value presently in the w register. Leave the result in w
movwf control Move (copy) the value in w to the register (or file) you have called CONTROL.
5.Bcf portb,3 clear bit 3 of PORT B.
btfss porta, 3 test bit 3 of PORTA and if it is SET (1), skip (move over or jump over) the next instruction in your program. If bit 3 is not SET, go to the next instruction in the program.
bsf portb, 3 SET bit 3 of PORT B.
<snip: spam link deleted>