This document serves as a comprehensive guide to programming with the MACRO Assembler for PDP-11 systems, particularly in a DOS/BATCH environment. It introduces fundamental software concepts for assembly language programming and highlights MACRO's robust features, including control over assembly functions, generation of relocatable object modules, and extensive listing capabilities.
The guide details the structure of MACRO source programs, covering statement formats (labels, operators, operands, comments), and the rules for defining symbols (user-defined, global, local, permanent) and expressions (absolute, relocatable, external). It explains character sets, number representations (octal by default, with decimal and binary options), and various unary and binary operators. Key concepts like the assembly location counter and its manipulation through directives are also covered.
A significant portion is dedicated to assembler directives for listing control (.LIST, .NLIST), page formatting (.TITLE, .SBTTL, .PAGE), module identification (.IDENT), and enabling/disabling assembly functions (.ENABL, .DSABL). Data storage directives such as .BYTE, .WORD, .ASCII, .ASCIZ, and .RAD50 are explained for defining various data types, alongside radix control directives. Location counter and program section directives (.EVEN, .ODD, .BLKB, .BLKW, .PSECT, .ASECT, .CSECT) are described for memory management and code organization.
Macro programming is thoroughly detailed, outlining macro definition (.MACRO, .ENDM), calls, argument handling (including nesting and concatenation), and utilities for querying argument properties (.NARG, .NCHR, .NTYPE). Conditional assembly directives (.IF, .ENDC, subconditionals, immediate conditionals) are presented for generating varied code. The document also covers error reporting (.ERROR, .PRINT), repeat blocks (.IRP, .IRPC, .REPT), and integrating system macro libraries (.MCALL).
Finally, it provides operating procedures for loading MACRO, using command input strings for file specifications, and generating cross-reference (CREF) tables. It concludes with a summary of special characters, addressing modes, and assembler directives, offering guidance on writing position-independent code and how MACRO flags code requiring linker modifications for relocation.
Site structure and layout ©2025 Majenko Technologies