No.42974 作者:nasiry 邮件:lazydaytime@hotmail.com ID:15283 登陆:3次 文章数:6篇 最后登陆IP:219.133.254.253 最后登陆:2006/5/18 11:39:17 注册:2003/9/30 0:43:49 财富:116 发帖时间:2003/9/30 0:52:32 发贴者IP:218.69.110.59 标题:nasiry:REENTRANt带来的问题,大家帮忙看看 摘要:No.42974REENTRANt带来的问题,大家帮忙看看 REENTRANt带来的问题,大家帮忙看看 原来的程序仅仅使用DATA(0-128),在使用REENTRANT标记后,可再入的程序变量都存储在IDATA(0-256)的范围,可是我用的不是52机,51机可是没有128-256。 我已经使用了PROGMA SMALL了。 有没有办法能让编译器不使用128-256的范围 是不是我没有说清楚阿? 在keil上看到这样的说法 QUESTION In SMALL memory model (all RAM internal, all code in 8K), do reentrant functions use the push and pop instructions to put variables on the stack or do they overlay variables. ANSWER The reentrant stack is simulated using R0 and R1. Variables are "pushed" and "poped" using the MOV @R0/R1 instructions. The hardware stack is not used for these variables. When you use the reentrant stack in internal memory, the hardware stack (accessed with SP) starts at the bottom of memory and grows up. The simulated reentrant stack starts at the top of memory (255) and grows down. You may use a debugger watch for and test for the collision of these two stacks. 看来这个也是reentrant stack为什么使用idata的原因,但是解决的办法呢? 再keil上面看到这样的办法 QUESTION I am using reentrant functions, but I have noticed that the startup.a51 file mentions reentrant stack pointers for each of the memory models (small, com ......
>>返回讨论的主题
|