Chapter 9 Writing Machine Language Instructions and Directive Statements

9.4.6org

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

 

 

.

 

sec_fnc

org

0x20

.

 

 

 

 

instructions

 

 

.

 

 

org

0x100

 

.

 

 

.

 

 

.

 

 

end

 

162 Writing Directive Statements

Page 174
Image 174
Panasonic MN1030 user manual 6 org, Secadr, Secfnc Org 0x20, Org 0x100 End