.pg .x global > procedure .x procedure .x begin .x end .lt ------------------------------------------------------------------------ GLOBAL PROCEDURE procedure-name - [PSECT=psect-name] [MASK=] CONST constants VAR variables BEGIN EXIT [value] [TYPE=type] RETURN END ------------------------------------------------------------------------ .el .b 3 The GLOBAL PROCEDURE macro sets up the enviorment for a globally accessable procedure. .b If ^&psect-name\& is specified, then the string "_global" appended to the ^&psect-name\& will be the .PSECT name, otherwise, the name of the procedure appended with to the string "_global" will be the .PSECT name. .b If _<^®ister-list\&_> is not specified, _<_> is assumed. .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 procedure from the code portion. If a _<^®ister-list\&_> was specified, the appropriate registers are save via the PUSHR instruction. The BEGIN macro must be specified. .b The EXIT macro will generate a $EXIT__S r0 instruction. If 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 RSB instruction. If a register mask was specified, the appropriate register are restore via the POPR instruction. .b The END macro is used to end the global procedure. If this is the last procedure in the assembly, the .END instruction can be specified instead of the END macro. .b For example: .b .lt .title example global module procedure begin clrl r1 return .end .el .b See also EXTERNAL PROCEDURE, FORWARD PROCEDURE, and PROCEDURE.