How to make pc+w works in the second half of a page in a SX28 ????
Does anyone knows if I can work with a lookup table in the second half of a page??
I cann't understand why if I inc PC in that zone, let's say in address #10E, it jumps "nowhere land".
For example, can I make this·work?
····················· ;**** Page_0_Jmp_Table *****
······················ ;
······················· ISR_Origin··=·$0·················;
······················· Page_0_Jmp_Table·=·$0F5···;
······················· Page_0···=·$0a0················;
······················· Page_1···=·$104················;
······················ ;=====================;
······················ ;····································· ;
······················ org Page_0_Jmp_Table·········; Address ($0F5)
······················ ;····································· ;
·······················ab_········ jmp········· ab······ ;
······················ ;=====================;
·······················;····································· ;
······················ org Page_0························; Address ($0a0)
······················ ;····································· ;
······················ Main1····· ·clr··· ····· w·········; Start
························ ··········· call········ ab_······ ;
························ ············jmp·········$········· ; End
······················ ;
;
······················ ·org Page_1····················· ·; Address ($100) Same page but second half.
······················· ;·····································;
······················· ab········· ·jmp······· pc+w····;
···························· ······· retw······· $40······;
······················· ;
;
·· Thanks....
I cann't understand why if I inc PC in that zone, let's say in address #10E, it jumps "nowhere land".
For example, can I make this·work?
····················· ;**** Page_0_Jmp_Table *****
······················ ;
······················· ISR_Origin··=·$0·················;
······················· Page_0_Jmp_Table·=·$0F5···;
······················· Page_0···=·$0a0················;
······················· Page_1···=·$104················;
······················ ;=====================;
······················ ;····································· ;
······················ org Page_0_Jmp_Table·········; Address ($0F5)
······················ ;····································· ;
·······················ab_········ jmp········· ab······ ;
······················ ;=====================;
·······················;····································· ;
······················ org Page_0························; Address ($0a0)
······················ ;····································· ;
······················ Main1····· ·clr··· ····· w·········; Start
························ ··········· call········ ab_······ ;
························ ············jmp·········$········· ; End
······················ ;
;
······················ ·org Page_1····················· ·; Address ($100) Same page but second half.
······················· ;·····································;
······················· ab········· ·jmp······· pc+w····;
···························· ······· retw······· $40······;
······················· ;
;
·· Thanks....
Comments
Post Edited (Lord Steve) : 9/24/2008 5:22:30 PM GMT