Chapter 9 Writing Machine Language Instructions and Directive Statements

Usage example

Below is an example use of the global directive.

 

global

SUB1

;external declaration

 

global

READ,

;external reference

 

 

WRITE

 

main

jsr

READ

 

 

.

 

 

 

.

 

 

 

jsr

WRITE

 

 

.

 

 

 

.

 

 

SUB1

mov

0x11, D0

 

 

.

 

 

 

.

 

 

 

rts

 

 

 

end

 

 

NOTE:

If a section name was referred as an external label, declaration with the section

 

 

directive, not with the global directive, is necessary.

 

 

Example:

section CODE,PUBLIC,1

 

 

sec

 

 

_TEXT

section CODE,PUBLIC,1

 

 

 

mov

sec, A0

174 Writing Directive Statements

Page 186
Image 186
Panasonic MN1030 user manual Below is an example use of the global directive, External declaration, External reference