(MANUAL) (MACRO11_FM) (PDP--11 MACRO--11 Language\Reference Manual) <ORDER_NUMBER>(AA--NJ90B--TK) <ABSTRACT> <EMPHASIS>(August 1991\bold) <p> This manual describes how to use the MACRO--11 relocatable assembler to develop PDP--11 assembly language programs. Although no prior knowledge of MACRO--11 is required, you should be familiar with the PDP--11 processor addressing modes and instruction set. This manual presents detailed descriptions of MACRO--11's features, including source and command string control of assembly and listing functions, directives for conditional assembly and program sectioning, and user-defined and system macro libraries. The chapters on operating procedures were previously found in two separate manuals (the <EMPHASIS>(Macro--11 Language Reference Manual) and the <EMPHASIS>(IAS/RSX Macro--11 Reference Manual). This manual should be used with a system-specific user's guide as well as a Linker or a Task Builder manual. <ENDABSTRACT> <ALIGN_CHAR>(#) <REVISION_INFO>(##This manual supersedes the <EMPHASIS>(PDP--11 MACRO--11 <LINE>##Language Reference Manual), AA--NJ90A--TK, <LINE>##and previous editions.) <REVISION_INFO>(Operating Systems and Versions:\##DECnet/E Version 4.1 <LINE>##IAS Version 3.3 <LINE>##MICRO/RSX Version 4.1 <LINE>##RSTS/E Version 9.6 <LINE>##RSX--11M Version 4.4 <LINE>##RSX--11M--PLUS Version 4.1 <LINE>##RT--11 Version 5.6) <REVISION_INFO>(Software:\##MACRO--11 Version 5.5) <ENDALIGN_CHAR> <ENDTITLE_PAGE> <COPYRIGHT_PAGE> <PRINT_DATE>(First Printing, August 1977) <PRINT_DATE>(Revised, January 1980) <PRINT_DATE>(Updated, December 1981) <PRINT_DATE>(Revised, March 1983) <PRINT_DATE>(Updated, May 1984) <PRINT_DATE>(Updated, October 1985) <PRINT_DATE>(Revised, October 1987) <PRINT_DATE>(Reprinted, August 1989) <PRINT_DATE>(Reprinted, August 1991) <COPYRIGHT_DATE>(1977, 1980, 1981, 1983, 1984, 1985, 1987, 1989, 1991.) <ENDCOPYRIGHT_PAGE>(S1762) <COMMENT> <CONTENTS_FILE> <PREFACE>(-11) <HEAD1>(Manual Objectives and Reader Assumptions \PREMOB_SEC) <P> This manual is intended to enable you to write programs in the MACRO--11 assembly language. <P> No prior knowledge of the MACRO--11 Relocatable Assembler is assumed, but you should be familiar with PDP--11 processors and related terminology, as presented in the <REFERENCE>(PDP11_BOOK). You are also encouraged to become familiar with the linking process, as presented in the applicable system manual (see the <REFERENCE>(PREASD_SEC\TEXT) section below), because linking is necessary for the development of executable programs. <P> If a terminal is available, we suggest that you try some of the examples in the manual or write a few simple programs that illustrate the concepts covered. Even experienced programmers find that working with a simple program helps them to understand a confusing feature of a new language. <P> The examples in this manual were done on an RT--11 system. You can also use MACRO--11 on IAS, RSX--11M, RSX--11M--PLUS and RSTS systems (see Part IV for information about operating procedures). <P> All references to RSX--11M also apply to RSX--11M--PLUS with the exception of those in <REFERENCE>(IRX_CHAP), which deals with each system individually. <HEAD1>(Document Structure\PRESTR_SEC) <P> This manual has four parts and eight appendixes. <P> Part I introduces MACRO--11: <LIST>(UNNUMBERED) <LE><REFERENCE>(INTRO_CHAP) lists the key features of MACRO--11. <LE><REFERENCE>(SPF_CHAP) discusses the advantages of following programming standards and conventions and describes the format used in coding MACRO--11 source programs. <ENDLIST> <P> Part II presents general information essential to programming with the MACRO--11 assembly language: <LIST>(UNNUMBERED) <LE><REFERENCE>(SAE_CHAP) lists the character set and describes the symbols, terms, and expressions that form the elements of MACRO--11 instructions. <LE><REFERENCE>(RAL_CHAP) describes MACRO--11 output and presents concepts essential to the proper relocation and linking of object modules. <LE><REFERENCE>(ADM_CHAP) describes how data stored in memory can be accessed and manipulated by using the addressing modes recognized by the PDP--11 hardware. <ENDLIST> <P> Part III describes the MACRO--11 directives that control the processing of source statements during assembly: <LIST>(UNNUMBERED) <LE><REFERENCE>(GAD_CHAP) discusses directives used for generalized MACRO--11 functions. <LE><REFERENCE>(MD_CHAP) discusses directives used in the definition and expansion of macros. <ENDLIST> <P> Part IV presents the operating procedures for assembling MACRO--11 programs: <LIST>(UNNUMBERED) <LE><REFERENCE>(IRX_CHAP) covers the IAS, RSX--11M, and RSX--11M--PLUS systems. <LE><REFERENCE>(RSRT_CHAP) covers the RSTS/RT--11 systems. <ENDLIST> <P> <REFERENCE>(CHAR_APP) lists the ASCII and Radix--50 character sets used in MACRO--11 programs. <P> <REFERENCE>(MAL_APP) lists the special characters recognized by MACRO--11, summarizes the syntax of the various addressing modes used in PDP--11 processors, and briefly describes the MACRO--11 directives in alphabetical order. <P> <REFERENCE>(PST_APP) lists alphabetically the permanent symbols that have been defined for use with MACRO--11. <P> <REFERENCE>(ERR_APP) lists alphabetically the error codes produced by MACRO--11 to identify various types of errors detected during the assembly process. <P> <REFERENCE>(SCS_APP) contains a coding standard that is recommended practice in preparing MACRO--11 programs. <P> <REFERENCE>(AVM_APP) discusses several methods of conserving dynamic memory space for users of small systems who may experience difficulty in assembling MACRO--11 programs. <P> <REFERENCE>(PIC_APP) is a discussion of position-independent code (PIC). <P> <REFERENCE>(LST_APP) contains an assembly and cross-reference listing. <P> <REFERENCE>(OBS_APP) contains obsolete MACRO--11 directives, syntax, and command line options. <P> <REFERENCE>(RLN_APP) describes the differences from the last release of MACRO--11. <HEAD1>(Associated Documents \PREASD_SEC) <P> For descriptions of documents associated with this manual, refer to the applicable documentation directory listed below: <LIST>(SIMPLE) <LE><REFERENCE>(IASDOCD_BOOK) <LE><REFERENCE>(RSXMPIDI_BOOK) <LE><REFERENCE>(RSXMSIDI_BOOK) <LE><REFERENCE>(GUI_BOOK) <LE><REFERENCE>(RSTSDOCD_BOOK) <ENDLIST> <HEAD1>(Conventions \PRECON_SEC) <P> The color <U>(red) is used in command string examples to indicate user input. <p> The term <emphasis>(printing characters\bold) includes all characters that display or print a symbol. <p> The term <emphasis>(nonprinting characters\bold) includes all characters other than those defined as printing characters. It includes space, horizontal and vertical tab, carriage return, line feed, and form feed, even though those characters cause cursor or print head movement. <P> The symbols defined below are used throughout this manual. <TABLE> <TABLE_SETUP>(2\15) <TABLE_HEADS>(Symbol \Definition) <TABLE_ROW>([ ] \Brackets indicate that the enclosed argument is optional.) <TABLE_ROW>(<HELLIPSIS> \Ellipsis indicates optional continuation of an argument list in the form of the last specified argument.) <TABLE_ROW>(UPPERCASE<LINE>CHARACTERS \Uppercase characters indicate elements of the language that must be used exactly as shown.) <TABLE_ROW>(lowercase<LINE>characters \Lowercase characters indicate elements of the language that are supplied by the programmer.) <TABLE_ROW>(Subscripts \Subscripts indicate the radix of a number. For example, 100<SUBSCRIPT>(8) indicates 100, base 8.) <TABLE_ROW>(<PARENDCHAR>(base) \The symbol <PARENDCHAR>(base) indicates the radix of numbers in code examples. For example, 100(octal) indicates that 100 is an octal value, while 100(decimal) indicates a decimal value.) <TABLE_ROW>(<BOX>(<CODE_EXAMPLE>(CTRL/x)) or ^x \<BOX>(<CODE_EXAMPLE>(CTRL/x)) signifies a control character, generated by simultaneously pressing the CTRL key and the <EMPHASIS>(x) key. <p> CTRL characters are sometimes represented in command line examples by ^x; do not confuse this representation of CTRL characters with MACRO--11 unary operators such as ^B, ^D, ^O, and ^R (see <REFERENCE>(GADTRDX_SEC)).) <ENDTABLE> <ENDPREFACE> <ENDCOMMENT> <ENDFRONT_MATTER>