×

PIC17C42中断时存储和恢复的情况(实现参数堆栈)

消耗积分:5 | 格式:rar | 大小:138 | 2009-06-27

分享资料个

The PIC17C42 has a 16 level deep hardware stack. The program counter is pushed into this stack on interrupts and subroutine calls. However, other key registers are not saved to the stack. Registers such as WREG,
ALUSTA (which has carry, zero and other flag bits) and the bank select register (BSR) must be saved in an interrupt service routine. The following macros, PUSH and POP implement a parameter stack in data memory to save these register values.
The indirect addressing register, FSR0, is used to implement this parameter stack. It is assumed that FSR0 and its control bits are not used or modified elsewhere.
The stack pointer (FSR0) is initialized at the highest RAM location (FFh).

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !