Re: 有關於換頁的問題
|
||||
---|---|---|---|---|
版主
|
如果中斷裡沒有用到 GOTO & CALL 指令的話,PCLATH 暫存器的值就不會在中斷裡使用或改變,這時就可以不用存起來。
發表於: 2008/9/3 16:09
|
|||
|
Re: 有關於換頁的問題
|
||||
---|---|---|---|---|
新會員
|
感謝你的回答^_^
所以根據你的回答,在發生中斷跳到Ox04位置時並不會改變PCLATH的值!所以我只要直接PUSH/POP PCLATH的值就可以囉!是這樣子嗎?
發表於: 2008/9/1 17:21
|
|||
|
Re: 有關於換頁的問題
|
||||
---|---|---|---|---|
版主
|
中斷發生時 PAGE 不用特別去做處理,因為 PC 的堆疊有 13 bit 長,範圍可到 8KW。
如果在中斷有使用到 GOTO 或 CALL 指令時就要小心,這時 PCLATH 就要先備份起來,以免在中斷修改了 PCLATCH 而回到主程式時 PCLATH 是別人的值,導致程式跳錯 PAGE。
發表於: 2008/9/1 15:59
|
|||
|
有關於換頁的問題
|
||||
---|---|---|---|---|
新會員
|
請問如果我程式執行在page1在發生中斷時要如何保留目前page的設定?
或者根本不用設,中斷發生時會自動堆疊?
發表於: 2008/9/1 15:52
|
|||
|