This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interrupt stack frames?

Someone suggested that I use 2-byte interrupt stack frames instead of 4-byte.

1. What is the difference?

2. How do I know if it applies to my
application?

Parents
  • A two byte stack frame can be used if your code runs within 64K code space(FF:0000 - FF:FFFF). If you need more than this, then you must use the 4 byte. The two byte frame will not save enough information if you are using more than 64K, since it saves only the lower two bytes of the address. The 4 byte mode saves all three bytes of the PC and PSW1 register.

    You can find this information in Intels 8XC251SX Embedded Microcontroller Users Manual. This manual describes the architecture and all of the on-chip hardware in detail.

Reply
  • A two byte stack frame can be used if your code runs within 64K code space(FF:0000 - FF:FFFF). If you need more than this, then you must use the 4 byte. The two byte frame will not save enough information if you are using more than 64K, since it saves only the lower two bytes of the address. The 4 byte mode saves all three bytes of the PC and PSW1 register.

    You can find this information in Intels 8XC251SX Embedded Microcontroller Users Manual. This manual describes the architecture and all of the on-chip hardware in detail.

Children
No data