Shop OBEX P1 Docs P2 Docs Learn Events
How to make pc+w works in the second half of a page in a SX28 ???? — Parallax Forums

How to make pc+w works in the second half of a page in a SX28 ????

SergioSergio Posts: 3
edited 2008-09-24 17:16 in General Discussion
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....

Comments

  • Lord SteveLord Steve Posts: 206
    edited 2008-09-24 17:16
    The jmp pc, w instruction does not update bit 8 of the PC.· It only updates the lower 8 bits.· Please double check that in the manual (datasheet).


    Post Edited (Lord Steve) : 9/24/2008 5:22:30 PM GMT
Sign In or Register to comment.