This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于data access mode中far和near数据类型的区别



在compiler选项中有个data access mode,可以选择默认或者near或者far等,请问有什么区别,选择不同对程序有什么影响,为什么我选择默认时处理结果和选择far时处理结果不同?请帮忙解答一下

  • 数据访问模式可以是far和near,near类型的数据可以通过DP指针直接加偏移访问,而far类型的数据必须向将32bit地址赋值到寄存器,然后读取寄存器访问。

    一般默认是在.bss数据段中的数据会自动使用near模式,其余的使用far模式。

    等多描述关于编译选项可以参考编译器的文档ti\ccsv5\tools\compiler\c6000_7.4.2\doc\SPRU187