TN238分享 文档 参考 学.pdfVIP

  • 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

文档评论(0)

1亿VIP精品文档

相关文档