Hi,
Ive been shown this example code (very basic and not necessarily well coded)
I understand it all upto the last block. I dont fully understand the status register and Z. The teacher spoke about something like it was checking for a zero, or trailing zero. Could someone clarify this for me please.
James
Ive been shown this example code (very basic and not necessarily well coded)
Code:
movlw 0x0A
movwf i
movlw b'00000110'
movwf k
incf i
movlw 2
addwf i,w
movwf k
movf i,w
addlw 2
movwf j
movf i,w
subwf k,w
btfsc status,Z
incf i
goto $
end
I understand it all upto the last block. I dont fully understand the status register and Z. The teacher spoke about something like it was checking for a zero, or trailing zero. Could someone clarify this for me please.
James