How to avoid unexpected results while the value of SFRS Register changed before ISR occurs?

Post Reply
a_ziliu
Posts: 208
Joined: 20 Mar 2017, 10:52

31 May 2021, 16:12

On interrupt, user must to be pushed the current SFRS value to the stack. Also on a return from interrupt, the stack is popped to the SFRS register.

Keil C51:


Note: push_(SFRS)以及_pop_(SFRS) are defined in the file.

IAR EW8051:

Note: __sfr __no_init volatile unsigned char SFRS @ 0x91;

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests