Hi,
the third line of the code I have not met her/it yet, that means?
movf TMRO, f
btfss STATUS,Z
goto $- 2
thx
by
chip15
Hi,
the third line of the code I have not met her/it yet, that means?
movf TMRO, f
btfss STATUS,Z
goto $- 2
thx
by
chip15
The $ represents the CURRENT Program Counter value in MPASM assembler. When this instruction is encountered, the MCU will jump forward (+) or back (-) the given number of memory locations.
goto $-2
Jump back two memory locations and continue execution from that point.
goto $+1
Continue execution from the NEXT memory location. This example is a neat way of saving codespace instead of using two sequential NOP statements.
Bookmarks