.lo 3,2 .lm 0.rm 72 .fl bold.fl break.fl capitalize.fl hyphenate.fl index.xl.fl period .nhd .fgd 15 .c;^*The MLR Macro Language\* .c;^*^&V2.3\&\* .b 5 .c;Reference Manual .b 5 .c;^*^&Structured Programming\&\* .c;^*^&in\&\* .c;^*^&VAX-11 Macro\&\* .b 10 .c;by .b .c;^&Rodrick A. Eldridge\& .c;^&Computation Center\& .c;^&Iowa State University\& .pg .c;^*Disclaimer\* .b 3 Although an attempt has been made to verify the accuracy of the information contained in this document, niether the Computation Center nor the author guarantees the validity of this information nor assumes any liability for results obtained based on this information. Any errors in this document may be reported to the author: .b .lt Rodrick A. Eldridge Computation Center 104 Computer Science Iowa State University Ames, Iowa 50011 (515) 294-7498 GVROD@ISUVAX.BITNET GVROD@ISUEVAX.BITNET GV.ROD@ISUVMS.BITNET .el .b Permission to reproduce all or part of this document for noncommercial purposes is granted, provided both the author and Iowa State University are given credit. .pg .c;^*Overview\* .b 3 The following pages describe each language structure that is present in the MLR Macro Language. .b The notation used to show the format of each macro is presented below: .ls .le;Text printed in capital letters must be entered exactly as show in either all upper case or all lower case letters. .le;Text printed in lower case letters may be any symbol allowed by the assembler. .le;Text in _[ _] are optional; if specified, text printed in capital letters must be intered as in 1. above; text printed in lower case letters may be entered as in 2. above. The _[ _]'s are not entered as part of the macro. .le;Text in _{ _} are a list of possible choices separated by the bar symbol (i.e. _|); you may specify only one of the items listed. If specified, follow rules 1. and 2. above. The _{ _}'s are not entered as part of the macro. .le;Text in _< _> may be a list of symbols separated by commas or blanks. The _< _>'s are required. .le;The entire macro may be specified on one line; or broken up on several lines by placing the dash symbol (i.e. _-) on lines to be continued. .le;Text followed by ... may be repeated zero or more times. .els .nt ^*Warning\* .b 2 Do not use any symbols beginning with the letters MLR in your program, these symbols are to be considered reserved for the MLR macros. Also, do not define any macro that begins with MLR, _$MLR or _$_$MLR or that has the same name as one of the following MLR macros. .en .pg .c;^*MLR Calling Conventions\* .b 3 The following tables show the symbols that can proceed an arguement in a call to a module: .b ^& .lt common symbol meaning code generated .el \& .b .lt push value PUSHL variable # push immediate value PUSHL #value & push address PUSHAL variable .el .b ^& .lt special symbol meaning code generated .el \& .b .lt b! push value MOVZBL variable,-(sp) w! push value MOVZWL variable,-(sp) l! push value PUSHL variable b# push immediate value MOVZBL #value,-(sp) w# push immediate value MOVZWL #value,-(sp) l# push immediate value PUSHL #value b& push address byte PUSHAB variable w& push address word PUSHAW variable l& push address longword PUSHAL variable q& push address quadword PUSHAQ variable o& push address octaword PUSHAO variable f& push address f_floating PUSHAF variable d& push address d_floating PUSHAD variable g& push address g_floating PUSHAG variable h& push address h_floating PUSHAH variable .el .pg # .b 15 .c;^*Part 1\* .b 5 .c;^*^&Structured Programming\&\* .c;^*^&Macros\&\* .x Structured Programming .req "[.req]array.rno" .req "[.req]begin.rno" .req "[.req]branch.rno" .req "[.req]break.rno" .req "[.req]case.rno" .req "[.req]clear.rno" .req "[.req]const.rno" .req "[.req]continue.rno" .req "[.req]data.rno" .req "[.req]default.rno" .req "[.req]descriptor.rno" .req "[.req]do.rno" .req "[.req]else.rno" .req "[.req]elseif.rno" .req "[.req]end.rno" .req "[.req]exit.rno" .req "[.req]external.rno" .req "[.req]external_module.rno" .req "[.req]external_procedure.rno" .req "[.req]flag.rno" .req "[.req]for.rno" .req "[.req]forever.rno" .req "[.req]forward.rno" .req "[.req]forward_module.rno" .req "[.req]forward_procedure.rno" .req "[.req]global.rno" .req "[.req]global_module.rno" .req "[.req]global_procedure.rno" .req "[.req]goto.rno" .req "[.req]if.rno" .req "[.req]item.rno" .req "[.req]loop.rno" .req "[.req]map.rno" .req "[.req]module.rno" .req "[.req]not.rno" .req "[.req]procedure.rno" .req "[.req]psect.rno" .req "[.req]pushq.rno" .req "[.req]repeat.rno" .req "[.req]repeat_forever.rno" .req "[.req]repeat_until.rno" .req "[.req]return.rno" .req "[.req]set.rno" .req "[.req]struct.rno" .req "[.req]then.rno" .req "[.req]trace.rno" .req "[.req]union.rno" .req "[.req]until.rno" .req "[.req]var.rno" .req "[.req]while.rno" .pg # .pg # .b 15 .c;^*Part 2\* .b 5 .c;^*^&Obsolete Macros\&\* .x Obsolete Macros .pg The following MLR macros are considered obsolete and should not be used. .b ^& .lt Obsolete macro Use this macro instead .el \& .b .lt descr descriptor d_descr descriptor_d exit_if_error if error then exit end goto_if_error if error then end item item_list_3 item_list_2 item_list_pair of break otherwise default record struct return_if_error if error then return end stdescr descriptor_s d_stdescr descriptor_d .el .req "[.req1]descr.rno" .req "[.req1]d_descr.rno" .req "[.req1]d_stdescr.rno" .req "[.req1]exit_if_error.rno" .req "[.req1]goto_if_error.rno" .req "[.req1]item.rno" .req "[.req1]of.rno" .req "[.req1]otherwise.rno" .req "[.req1]record.rno" .req "[.req1]return_if_error.rno" .req "[.req1]stdescr.rno" .pg # .b 15 .c;^*Part 3\* .b 5 .c;^*^&System Services\&\* .c;^*^&and Utilities\&\* .c;^*^&Macros\&\* .x System Services and Utilities Macros .req "[.req2]acl.rno" .req "[.req2]cli.rno" .req "[.req2]conv.rno" .req "[.req2]dcx.rno" .req "[.req2]dtk.rno" .req "[.req2]edt.rno" .req "[.req2]fdl.rno" .req "[.req2]lbr.rno" .req "[.req2]lib.rno" .req "[.req2]mth.rno" .req "[.req2]ots.rno" .req "[.req2]psm.rno" .req "[.req2]smb.rno" .req "[.req2]smg.rno" .req "[.req2]sor.rno" .req "[.req2]str.rno" .req "[.req2]sys.rno" .req "[.req2]rms.rno" .req "[.req2]tpu.rno" .pg # .b 15 .c;^*Part 4\* .b 5 .c;^*^&Quadword Math\&\* .c;^*^&Macros\&\* .x Quadword Math Macros .req "[.req3]addq.rno" .req "[.req3]cmpq.rno" .req "[.req3]divq.rno" .req "[.req3]mulq.rno" .req "[.req3]subq.rno" .req "[.req3]tstq.rno" .pg # .b 15 .c;^*Appendix A\* .b 5 .c;^*^&Error and Warning\&\* .c;^*^&Messages\&\* .x Error and Warning Messages .req "[.req]errors.rno" .req "[.req]warnings.rno" .pg # .b 15 .c;^*Appendix B\* .b 5 .c;^*^&References\&\* .pg .b 3 .ls .le;^*Top-Down Structured Programming Techniques\*, by ^&Clement L. McGowan and John R. Kelly\&; Petrocelli/Charter, Mason/Charter Publications, 1975. (QA76.6.M318 1975) .le;^*Computer Programming and Architucture -- The VAX 11\*, by ^&Henry M. Levy and Richard H. Eckhouse, Jr\&, Digital Equipment Corporation, Digital Press, 1980. (QA76.8.V37) .le;^*VAX Macro and Instruction Set Reference Manual\*, Digital Equipment Corporation, September 1984. (AA-Z700A-TE, Volume 10B) .le;^*VAX Architecture Handbook\*, Digital Equipment Corporation. .le;^*TLXSPM - TELEX Structured Macros\*, MOSTEK OPS DECUS SIG tape submission. [VAX83A.DFWLUG.MOSTEK.OPSPLN.TLXSPM] .le;^*VAX/VMS Utility Routines Reference Manual\*, Digital Equipment Corporation, April 1986. (AA-Z504B-TE, Volume 8A) .le;^*VAX/VMS Run-Time Library Routines Reference Manual, Part I\*, Digital Equipment Corporation, April 1986. (AA-Z502C-TE, Volume 8B; QLZ55-GZ, Volumes 8B and 8C) .le;^*VAX/VMS Run-Time Library Routines Reference Manual, Part II\*, Digital Equipment Corporation, April 1986. (AA-Z505C-TE, Volume 8C; QLZ55-GZ, Volumes 8B and 8C) .le;^*VAX/VMS System Services Reference Manual\*, Digital Equipment Corporation, April 1986. (AA-Z501C-TE, Volume 8D) .le;^*VAX Record Management Services Reference Manual\*, Digital Equipment Corporation, April 1986. (AA-Z503B-TE, Volume 9) .le;^*QUADMATH - Quadword Math\*, HUGHES AIRCRAFT DECUS SIG tape submission. [VAX83C.HUGHES] .els .pg .if index .req "mlr.rnx" .endif index