The symbol $ on its own represents the current value of the location counter. When the location counter is used within the executable code section of the program it may be alternatively refered to as the program counter.e.g. ; here $ would be refered to as the program counter goto $+12 ; here $ would be refered to as the location counter msg1 .db "hello world" .db $-msg1NOTE:The $+ and $- symbols are actually considered as though there were a space between the $ and the following character, here the $ is concidered to be on its own. However the symbol $abc is concidered to be the hex number ABC, here the $ is considered to belong with the abc and is not seperate from it.
Some processors use a program counter (a real register in the processor actually known as the program counter) that counts words instead of bytes while executing machine code instructions. For such processors the $ symbol will return the number of the current word if the location counter is currently within a code section. It will return the number of the current byte if the location counter is currently within a data section.
For processors which count bytes while executing machine code instructions, the location counter will return the number of the current byte regardless of whether the location counter is currently within a code or data section.
The PIC family of processors has a program counter that counts words not bytes