.org 伪操作

用途

用于设置当前位置计数器的值。

语法

描述
.org expression

描述

.org 伪操作会将当前位置计数器的值设置为 表达式。 这个伪操作也可以减少位置计数器。 汇编程序是面向控制节 (csect) 的; 因此,不允许使用导致位置计数器超出当前 csect 的绝对表达式或表达式。

参数

描述
expression 代表当前位置计数器的值。

示例

以下示例演示了 .org 伪操作的用法:


# Assume assembler location counter is 0x114.
.org $+100
#Skip 100 decimal byte (0x64 bytes).
.
.
# Assembler location counter is now 0x178.