============================== COSMIC =============================
1、 @tiny - Zero Page(0x00~0xFF) 申明 :@tiny char a
a) .bsct - 在zero page区域的初始化变量
b) .ubsct- 在zero page里面的未初始化变量
c) .bit - 位操作段
d) .share @near - Zero page 以外的RAM区域
a) .bss - 未初始化变量区域;
b) .data - 已初始化变量区域;
c) .const - 常量区域 @far
.fdata (large variable)
.fconst
.text @eeprom
2、
Placing Data Objects in Short Range Memory
@tiny char c;
#pragma space extern [] @tiny
Placing Data Objects in Long Range Memory
@near char ext;
#pragma space extern [] @near
Placing Data Objects in the EEPROM Space
@eeprom char var;
#pragma space extern [] @eeprom @near
Note:The @near modifier is necessary because the eeprom is located outside the zero page.
3、
Memory Models for code smaller than 64K
Stack Short (mods0) - Global variables are defaulted to short range
Any global object in long range will have to be accessed explicitly with the @near modifier unless accessed through a pointer.
Stack Long (modsl0) - Global variables are defaulted to long range
Any object in short range will have to be accessed explicitly with the @tiny modifier.
Memory Models for code larger than 64K
Stack Short (mods) - Global variables are defaulted to short range
Any global object in long range will have to be accessed explicitly with the @near modifier unless accessed through a pointer.
Stack Long (modsl) - Global variables are also defaulted to long range
Any object in short range will have to be accessed explicitly with the @tiny modifier