Code Examples

Built-in Constants and Variables Examples
	processor p16f887
	include	"p16f887.inc"

#define ENDING	3

	org	__PAGE_0
label0:
	pagesel	label1
	messg "__ACTIVE_PAGE_ADDR: #v(__ACTIVE_PAGE_ADDR)"
	goto	label1

	org	__PAGE_1
label1:
	pagesel	label2
	messg "__ACTIVE_PAGE_ADDR: #v(__ACTIVE_PAGE_ADDR)"
	goto	label2

	org	__PAGE_2
label2:
	pagesel	label3
	messg "__ACTIVE_PAGE_ADDR: #v(__ACTIVE_PAGE_ADDR)"
	goto	label3

	org	__PAGE_#v(ENDING)
label3:
	messg "__ACTIVE_PAGE_ADDR: #v(__ACTIVE_PAGE_ADDR)"

	end