cancel
Showing results for 
Search instead for 
Did you mean: 

Local Labels in ST7 assmebly

ahamil3560
Associate II
Posted on January 07, 2003 at 06:55

Local Labels in ST7 assmebly

2 REPLIES 2
ahamil3560
Associate II
Posted on January 06, 2003 at 16:19

In ST7 assembly language is there any other way to make a label have local scope other than listing it after a 'LOCAL' directive as you would for a label in a macro?

stephanie
Associate II
Posted on January 07, 2003 at 06:55

LOCAL is a directive used only for MACROs. In order to define a label as local to a file, there is nothing to do!! That's the default case:

loop ; loop is local (can not be called from another

jra loop ; file)

There are 2 ways to define a label as public:

.loop ; to place a dot before the label name

jra loop

PUBLIC loop ; or to define it explicitely as public!

loop

jra loop

Then, in all the files where the public label has to be called, the directive EXTERN will have to be used:

EXTERN loop.w if loop address is a word (loop defined in the code)

EXTERN variable.b if variable is defined in RAM0

Hoping it will help!!