If EA = 1; is added before the TI = 1; statement, the following warning will appear:
* error 65: access violation at C:0x0023 : no 'execute/read' permission
This warning means that the program has run away.
Just put the EA = 1; statement in TI = 1; or somewhere else. The error will disappear after that. The sp value is also normal. See picture for details.
Possible reasons for other programs running away:
https://blog.csdn.net/wacflp/article/details/67637506