Specifications

7-4 Programmer’s Guide Sega
Psy-Q Development System
MODULE and MODEND
Description Code occurring after a MODULE statement, and up to and including the MODEND
statement, is considered to be a module. Local labels defined in a module can be re-
used, but cannot be referenced outside the module's scope. A Local label defined
elsewhere cannot be referenced within the current module.
Syntax MODULE
...
...
MODEND
See Also LOCAL
Remarks
Modules can be nested.
The MODULE statement itself is effectively a non-local label and will de-scope
any currently active default scoping.
Macros can contain modules or be contained in a module. A local label occurring
in a module, can be referred to by a macro residing anywhere within the module.
A module contained within a macro can effectively provide labels local to that
macro.
Examples Strat module
moveq #1,d0
bra @Lab1
...
@Lab1 subq.w #1,count(a0)
beq.s @SetTact
...
rts
@SetTact module
move.w #Tactic2(a0)
...
@Lab1 move.l a1,-(sp)
...
move.l (a1),d0
bgt.s @Lab1
rts
modend
modend