- 2
- 0
- 约1.76万字
- 约 7页
- 2020-10-30 发布于广东
- 举报
Technical Note TN 238
HCS12X – Data Definition
The present document describes how programmer can help the HCS 12X compiler to generate the
more optimal code for data access. It will cover following topics:
• ariables allocated in direct addressing area
• ariables allocated in extended addressing area
• ariables allocated in banked addressing area – Using Logical Addresses
• ariables allocated in banked addressing area – Using Global Addresses
• Banked Constant allocation
• Logical Addresses vs. Global Addresses
For each of the variable type enumerated above, we will describe :
• How to define a variable
• How to declare a variable
• Code generated to access the variable
• How to define a pointer pointing to such a variable
• Code generated to access the pointer and access the variable.
• Placement in PRM file.
Note 1 :
Information described in this technical note apply to SMALL (-Ms) and BANKED (-Mb)
Memory model. They do not apply to LARGE (-Ml) memory model.
Note 2 :
We usually recommend using SMALL memory model for application with less than 32Kb
code and BANKED memory model otherwise. We do not recommend using LARGE memory
model.
Page 1 of 7 Rev. 1.2
Technical Note TN 238
Variables allocated in Direct Addressing Area
In order to inform the compiler that a variables is allocated on the direct page, you have to define (and
declare) it in a specific segment with attribute __SHORT_SEG.
• Defining Accessing Data on Direct Addressing Area:
1. ariable definition is done as follows:
#pragma DATA_SEG
您可能关注的文档
- BD220006_CP400s Connect one CPU Or CPUs Connect one CP400_CP400多个屏或多个控制器的连接.pdf
- BD220008_CP400 Control & Status Word_CP400控制字和状态字.pdf
- BD220010_CP400 Alarm & History Curves_CP400历史显示和警报显示.pdf
- bPlus条码秤操作培训.pdf
- CD220003_CP600 Communicate with AC500 & eCo PLC via Modbus RTU_CP600触摸屏和AC500以及eCo PLC Modbus RTU通讯.pdf
- CD220005_CP600 Ports Connection_CP600使用不同端口时的接线示意图.pdf
- CD220010_CP600 Runtime update_CP600运行环境更新.pdf
- CD220012_CP600 Alarm & History Curves_CP600历史曲线和报警条.pdf
- CMTest软件操作文档V2.pdf
- CoDeSys编程简介_53页_0.5M_高清版.pdf
最近下载
- 高中信息技术课程思政教育研究教学研究课题报告.docx
- 在公司2026年度党风廉政建设和反腐败工作会上的讲话.docx VIP
- 义务教育版(2024)六年级全一册信息科技 第22课 电梯门的开与关 课件.pptx VIP
- 2025中华护理学会团体标准——抗肿瘤药物静脉给药技术.pptx
- 水电站调速器系统计算书.doc VIP
- 2024—2025学年度人教版四年级语文下册课内阅读汇编30篇有答案.docx VIP
- 不良品处 理流程图.pdf VIP
- 义务教育版(2024)六年级全一册信息科技 第27课 定速巡航的控制 教学设计.docx VIP
- CWM500射频测试指导文档.pdf VIP
- 剑桥王牌教材第二版Think1 Unit2 单词默写.docx VIP
原创力文档

文档评论(0)