Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

 
4.3 CURRENT OFFSET

Symbol '$' (dollar) represents current offset of compilation:
   goto $ ; goto to self
It can be vary useful in macros, because mas have not syntax for declaring local labels:
 
  .macro reprep

     addlw 10

     goto $-1

  .endm
 

 

All instructions have same size, so '$ - number' point to 'number' instructions backwards.
 

[PREV][INDEX][NEXT]