.pg .x global > module .x module .x begin .x end .lt ------------------------------------------------------------------------ GLOBAL MODULE module-name - [PSECT=psect-name] [MASK=] CONST constants VAR variables BEGIN EXIT [value] [TYPE=type] RETURN END ------------------------------------------------------------------------ .el .b 3 The GLOBAL MODULE macro sets up the enviorment for a globally accessable module. .b If _<^&argument-list\&_> is specified, each argument in the list will be appended to the module name and each resultant string is used in a constant assignment, assigning each with it's offset value from AP. The string ".narg" appended to the module name is always assigned the value of 0 and represents the number of arguments passed to this module. .b If no arguments are specified in _<^&argument-list\&_>, then _<_> must be specified as a place holder for the _<^&argument-list\&_>. .b If _<^®ister-list\&_> is not specified, _<_> is assumed. If ^&psect-name\& is specified, then the string "_global" is appended to the ^&psect-name\& and will be used as the .PSECT name; otherwise, the name of the module appended to the string "_global" will be the .PSECT name. .b The CONST macro and the VAR macro generate not code and are optional and can be specified as often as required for documentation purposes. .b The BEGIN macro separates the data portion of a module from the code portion. You must specify the BEGIN macro. .b The EXIT macro will generate a $EXIT__S r0 instruction. If a value is specified, the value will be moved to r0 before the $EXIT__S intruction is generated. If ^&type\& is not specified, then L is assumed. The EXIT macro is optional. .b The RETURN macro will generate a RET instruction. .b The END macro is used to end the global module. If this is the last module in the assembly, the .END instruction can be specified instead of the END macro. .b For example: .b .lt .title example global module example const $ssdef length=3 var table: .blkl length begin if neq then exit #ss_insfarg else movl example.a(AP),table movl example.b(AP),table+4 movl example.c(AP),table+8 clrl r0 end return .end .el .b See also EXTERNAL MODULE, FORWARD MODULE, and MODULE.