Code Examples

Special Directive examples
These directives exist stating with the svn 1187 version: gputils-src-20160220-1187.tar.gz and gputils-20160220-1187-setup.exe These can not be used in mpasm compatible mode!
	processor p16f1519
	radix	dec

i = 0
  while (i < 10)
	messg "========= i: #v(i) ========="
    #if (i == 0)
	messg "    #if 0 i: #v(i)"
    #elif (i == 1)
	messg "    #elif 1 i: #v(i)"
    #elif (i == 2)
	messg "    #elif 2 i: #v(i)"
    #else
	messg "    #else 3-9 i: #v(i)"
    #endif
i++
  endw
	end
	processor p18f4520
	radix	dec

#define	Def1
#define	Def2

	ifdef Def1
	  messg "Def1 defined."
	endif

	ifdef Def3
	  messg "Def3 not defined."
	elifdef Def2
	  messg "Def2 defined."
	endif

	end