下面列举了ADS使用的一些内置变量和常量。
Table 3.3. Built-in variables
变量 | 注释 |
---|---|
{ARCHITECTURE} | Holds the name of the ARM architecture selected by the –device option. |
{AREANAME} | Holds the name of the current AREA. |
{ARMASM_VERSION} | Holds an integer that increases with each version of armasm. |
|ads$version| | Has the same value as {ARMASM_VERSION}. |
{CODESIZE} | Is a synonym for {CONFIG}. |
{COMMANDLINE} | Holds the contents of the command line. |
{CONFIG} | Has the value 32 if the assembler is assembling ARM code, or 16 if it is assembling Thumb code. |
{CPU} | Holds the name of the CPU selected by the –device option. |
{ENDIAN} | Has the value “big” if the assembler is in big-endian mode, or “little” if it is in little-endian mode. The default value is selected by the –device option. |
{FPU} | Holds the name of the FPU. The default FPU name is selected by the –device option. |
{INPUTFILE} | Holds the name of the current source file. |
{INTER} | Has the boolean value True if /inter is set. The default is False. |
{LINENUM} | Holds an integer indicating the line number in the current source file. |
{OPT} | Value of the currently-set listing option. The OPT directive can be used to save the current listing option, force a change in it, or restore its original value. |
{PC} or . | Address of current instruction. |
{PCSTOREOFFSET} | Is the offset between the address of the STR pc,[…] or STM Rb,{…, pc} instruction and the value of pc stored out. This varies depending on the device specified. |
{ROPI} | Has the boolean value True if /ropi is set. The default is False. |
{RWPI} | Has the boolean value True if /rwpi is set. The default is False. |
{VAR} or @ | Current value of the storage area location counter. |
来源:
作者:三十三岁又新生
https://blog.csdn.net/yanglijing/article/details/4687173