Hi all!
Here is a sample program of mine. It has 4 tables each 100 lines data & I want to call them from end of my memory.
In the comments I have wrote the actual line number in MPLAB.
My first question is I want to call the TABLE1 from the MAIN routine (MAIN is in 2000 line). Is my coding write?
Thanks
Here is a sample program of mine. It has 4 tables each 100 lines data & I want to call them from end of my memory.
In the comments I have wrote the actual line number in MPLAB.
My first question is I want to call the TABLE1 from the MAIN routine (MAIN is in 2000 line). Is my coding write?
Thanks
Code:
org 0x00
;setting up ports
bsf STATUS.rp0
clrf TRISB
bcf STATUS.rp0
org 0x03
TABLE1 addwf PCL,f
retlw xx
retlw xx
retlw xx
retlw xx
-----
----- ;100 line
TABLE2 addwf PCL,f
retlw xx
retlw xx
retlw xx
retlw xx
-----
----- ;200 line
org 0x04
TABLE3 addwf PCL,f
retlw xx
retlw xx
retlw xx
retlw xx
-----
----- ;300 line
TABLE4 addwf PCL,f
retlw xx
retlw xx
retlw xx
retlw xx
-----
----- ;400 line
MAIN movlw 0x03 ;main program starts from 2000 line
movwf PCLATH
call TABLE1 ;call Table1