Just a quick question. What does the $ symbol mean/equate in this code mean? It is not in my pic mcu quickchart. The code needs to go into a 16f870. I found this code in a delay code generator at piclist.com
1. goto $ will loop forever given no interrupts intervene.
2. goto $ + X will skip forward X instructions.
3. goto $ - X will skip backward X instructions.
P.S. When a delay routine is this ugly, you should just make up your own and make it paramatized so that one routine can suffice for most your long delay times.
You must always be away of the default radix or use definitive expressions.
If you want to skip eleven you do this:
GOTO $ + .11
GOTO $ + 0X0B
GOTO $ + 0BH
GOTO $ + B'00001011'
Or do this:
RADIX DEC
GOTO $ + 11
This is true for every single line of opcode and not just goto's.
If not mistaken, it changes the default way that the compiler interprets numerals from a base (or radix) of sixteen (hex) to a base of ten (decimal). Otherwise, it is good common practice to pre/post-fix all numerals as donniedj shows at the top of his post above.