Jump to content

MACRO-11

From Alfawiki
Digital Equipment Corporation
IndustryComputer hardware, software
FoundedMay 16, 1957; 69 years ago (1957-05-16)
FounderKen Olsen, Harlan Anderson
Headquarters
Maynard, Massachusetts
,
United States

MACRO-11 is an assembly language featuring macro capabilities, created for the PDP-11 series of minicomputers by Digital Equipment Corporation (DEC). It replaced the earlier PDP-11 assembler known as Program Assembler Loader (PAL-11R), which did not include macro functionality.

This assembler was supported across all DEC PDP-11 operating systems. Although PDP-11 Unix environments utilized a different assembler (as), it shared a similar structure but differed in syntax and offered fewer features. Additionally, MACRO-11 and its assembled programs could operate within the RSX-11 compatibility mode provided by OpenVMS on VAX hardware.

Programming example

Presented below is a simple "Hello, World!" program written in PDP-11 macro assembler tailored for RT-11:

<syntaxhighlight lang="nasm">

       .TITLE  HELLO WORLD
       .MCALL  .TTYOUT,.EXIT

HELLO:: MOV #MSG,R1 1$: MOVB (R1)+,R0

       BEQ     DONE
       .TTYOUT
       BR      1$

DONE: .EXIT

MSG: .ASCIZ /Hello, world!/

       .END    HELLO

</syntaxhighlight>

The .MCALL directive specifies the use of .TTYOUT and .EXIT macros, which translate into EMT instructions that invoke RT-11 monitor services.

If this source is saved as , the following RT-11 commands assemble, link, and execute the program:

<syntaxhighlight lang="nasm"> .MACRO HELLO ERRORS DETECTED: 0

.LINK HELLO

.R HELLO Hello, world! . </syntaxhighlight>

(The RT-11 command prompt is represented by ".")

More advanced MACRO-11 samples include Kevin Murrell's KPUN.MAC and the JULIAN routine from Farba Research. Comprehensive collections of PDP-11 code can be accessed through Metalab freeware and Trailing Edge archives.

External links