Specifications

7-2 Programmer’s Guide Sega
Psy-Q Development System
Syntax and Scope
Syntax
Local Labels are preceded by a local label signifier. By default, this is an @ sign;
however, any other character may declared by using the l option in an OPT
directive or on the Assembler command line - see Assembler Options chapter 3.
Local label names follow the general label rules, as specified in chapter 4.
Local labels are not de-scoped by the expansion of a macro.
Scope The region of code within which a Local Label is effective is called its Scope. Outside
this area, the label name can be re-used. There are three methods of defining the
scope of a Local Label:
The scope of a local label is implicitly defined between two non-local labels.
Setting a variable, defining an equate or RS value does not de-scope current local
labels, unless the d option has been used in an OPT directive or on the Assembler
command line - see Assembler Options, chapter 10.
The scope of a Local Label can also, and more normally, be defined by the
directives MODULE and MODEND - see chapter 8.
To define labels (or any other symbol type) for local use in a macro, the LOCAL
directive can be used - see chapter 8.
Examples plot2 move.b comp\w,d3
...
cmp.w #-84,d3
bge.s @chk1
add.w #168,d3
bra.s @ret
@chk1 cmp.w #83,d3
...
jsr lcolour
move.w d3,d0
SetX set x+1
@ret rts
plot3 movem.w d6-d7,-(sp)
...
@ret rts