CX51 用户手册----LARGE伪指令

声明:

1、本翻译仅供个人学习使用,本人没有提供技术支持的义务,也不承担由此引发的任何后果。

2、请勿用于商业用途。

3、英文来自:http://www.keil.com/support/man/docs/c51/。

4、欢迎大家共同与我交流探讨(290207203@qq.com)。

LARGE Compiler Directive

Abbreviation

LA

Arguments

None.

Default

SMALL

µVision

Options — Target — Memory Model.

Description

This directive selects the LARGE memory model where all variables and local data segments of functions and procedures reside (as defined) in the external data memory of the 8051 system. Up to 64 KBytes of external data memory may be accessed. This, however, requires the long and therefore inefficient form of data access through the data pointer (DPTR).

Regardless of memory model type, you may declare variables in any of the 8051 memory ranges. However, placing frequently-used variables (such as loop counters and array indices) in internal data memory significantly improves system performance.

 Note

  • The stack required for function calls is always placed in IDATA memory.
See Also

COMPACTROMSMALL

Example
C51 SAMPLE.C LARGE

#pragma large


LARGE 编译器伪指令

缩写

LA

参数

无。

缺省

SMALL

µVision

Options — Target — Memory Model.

描述

这个伪指令选择 LARGE 存储器模型。在8051系统中,所有的变量和函数的局部数据段(根据定义)保存在外部数据存储器中。 最多可以访问64 KB字节的外部数据存储器。但是这需要更长,效率不高的通过DPTR的数据访问。 

不管存储器模型,用户可以在8051的任意存储器声明变量。但是,把经常使用的变量(比如循环计数器和数组索引)放在内部数据存储器可以有效地提高系统性能。

注意

  • 函数调用需要的栈总是放在 IDATA 存储器。
参考

COMPACTROMSMALL

示例
C51 SAMPLE.C LARGE

#pragma large




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值