View Full Version : $-2 ????
chip15
- 10th February 2006, 16:03
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
Melanie
- 10th February 2006, 17:51
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.
chip15
- 11th February 2006, 15:00
THX Melanie. Smack!
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.