i just found out the phenomenon of the requirement of page addressing should my 16F exceed2K of program memory which is the case now. I exceeded 2K but I will definitely not exceed 4K so my code will only deal with Page 0 and Page 1.
I looked at the program memory chart at the 877a datasheet and page 1 spans from 0005h to 7FFh while page 2 spans from 800h to FFFh. Does this mean that for each time i implement a call /goto which is located in page 1, I have to execute the following?
(@page1 , PCLATH <4:3> is 1:0 - except for the very last address on page 1 which is 1:1)
Is my assumption of what I read in the datasheet correct?
thanks alot!
I looked at the program memory chart at the 877a datasheet and page 1 spans from 0005h to 7FFh while page 2 spans from 800h to FFFh. Does this mean that for each time i implement a call /goto which is located in page 1, I have to execute the following?
(@page1 , PCLATH <4:3> is 1:0 - except for the very last address on page 1 which is 1:1)
Code:
org somewhere_on_page0
;now I want to call a routine from page 1
bsf PCLATH,4
bcf PCLATH,3
call routine on page 1
;next line of code is when called routine returns
;do i have to reset the page back to 0 again?
Is my assumption of what I read in the datasheet correct?
thanks alot!