导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→发表看法:[nasiry]REENTRANt带来的问题,大家帮忙看



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 ......

>>返回讨论的主题



  发表回复
用户名   *您没有注册?
密码   *
验证码   * .
标题   *
心情
随便说说    我回答你    最新发现    得意的笑   
气死我了    真是没劲    坚决同意    表示反对   
大家过来    好奇怪哟    懒得理它    大家小心   
文件上传
内容


字体:      字体大小:    颜色:
粗体 斜体 下划线 居中 超级连接 Email连接 图片 Flash图片 Shockwave文件 realplay视频文件 Media Player视频文件 QuickTime视频文件 引用 飞行字 移动字 发光字 阴影字 查看更多的心情图标 背景音乐
点击加入表情
                         
选项
有回复时用短消息通知您?

   




老古网执行:16毫秒 最大:5186毫秒 查询6次