This document details the MACRO6 assembly processor for the PDP-6 digital computer, designed to translate human-readable source code into machine code. It highlights the advantages of assembly programming, such as mnemonic codes, symbolic addressing, and simplified debugging. MACRO6 is a two-pass assembler that produces relocatable binary code, compatible with the PDP-6 Modular Software System.
The document covers the fundamental elements of the MACRO6 language, including statement structure (label, code, variable fields), and different data types such as symbols, numbers (decimal, octal, binary, floating-point), characters (ASCII), and literals. It explains various statement types, including machine instructions (primary and I/O), extended instructions for convenience, and numerous data-generating codes (e.g., DEC, OCT, EXP, XWD, Z, POINT, SIXBIT, ASCII, BYTE, BLOCK) used for creating different data configurations and reserving storage.
A significant portion is dedicated to processor control codes, which dictate the assembler's operation rather than generating executable code. These include commands for repetitive processing (REPEAT), conditional assembly based on expressions or string comparisons (IFn, IFIDN, IFDIF), setting the number radix (RADIX), managing the location counter for absolute or relocatable code (LOC, RELOC), and controlling code loading phases (PHASE, DEPHASE). Other controls manage assembly passes, output suppression, symbol definitions, and listing formats.
The document also elaborates on relocation and linking, explaining how MACRO6 creates relocatable programs and how addresses are adjusted during loading. It describes EXTERN and INTERN codes for linking independently assembled subroutines and LIBRARY for incorporating common library routines. Macro instructions are introduced as a way to abbreviate common coding sequences, with explanations of macro definition (DEFINE), dummy arguments, created symbols, concatenation, indefinite repeats (IRP), nesting, and redefinition.
Error handling is discussed, categorizing errors into language usage and program errors, with a list of specific error flags (e.g., M for multiply defined symbol, P for phase error, R for relocation error) that help in debugging. Finally, it details the assembly output formats: an assembly listing (source code with assembled values and error messages) and binary programs in either RIM (Read-in Mode) format for paper tape or LINK format for the Linking Loader, which supports relocatability and symbol linking between subprograms. It concludes with the initial states of the processor at the start of each assembly.
Site structure and layout ©2025 Majenko Technologies