ON 20030114@3:52:27 AM at page:
http://www.piclist.com/techref/member/yIA-YAY-852/index.htm
yIA-YAY-852 yousef I Alnasr Questions:
hi every one
I am working with pic16c74
and i have a problem with setting the memory pages, can any one advice me to how to use a macro for automatic page setup, as i do set the flag every time when i see call routine or goto
cheers
ON 20030123@2:37:19 AM at page:
http://www.piclist.com/techref/member/yIA-YAY-852/index.htm
yIA-YAY-852 yousef I Alnasr Questions:
can any one tell me if these code are suitable for macro page seting, if not can they advice me what is the best way to set page boundry in 16 series chips
cheers
NOLIST
BANK2 EQU 0X0800
;
PCALL MACRO ROUTINE
IF ((ROUTINE & BANK2) == BANK2)
BSF PCLATH,3 ; set page register
MESSG "HIL: Long CALL to page1 set to overcome page BOUNDARY"
ELSE
BCF PCLATH,3 ; RESET PAGE REGISTER
MESSG "HIL: LONG CALL TO PAGE0 SET TO OVERCOME PAGE boundary"
ENDIF
CALL ROUTINE
ENDM
LIST
;
PGOTO MACRO ROUTINE2
IF ((ROUTINE2 & BANK2) == BANK2)
BSF PCLATH,3 ; set page register
MESSG "HIL: Long GOTO to page1 set to overcome page BOUNDARY"
ELSE
BCF PCLATH,3 ; RESET PAGE REGISTER
MESSG "HIL: LONG GOTO TO PAGE0 SET TO OVERCOME PAGE boundary"
ENDIF
GOTO ROUTINE2
ENDM
LIST