Chapter 9 Writing Machine Language Instructions and Directive Statements
162 Writing Directive Statements
9.4.6 org
Syntax
label operation operand
org expression
Default settings
The current location counter value will be inherited.
Functional description
This directive sets the location counter to the address value specified by expression.
Operand coding rules
For the expression coded in the operand, the attribute of the calculation result must be abs(absolute).
For a discussion of attributes of expressions, see Chapter 8 “Writing Source Statements” Section 8.7
“Expressions” Section 8.7.4 “Expression Attributes”.
If the expression value is less than the current location counter, it causes an error.
Usage example
Below is an example use of the org directive.
_CODE section CODE, PUBLIC, 2
sec_adr .
instructions
.
org 0x20
sec_fnc .
instructions
.
org 0x100
.
.
.
end