Jump to content

MACRO-10

From Alfawiki
MACRO-10
Company typeAssembly language
IndustryComputer programming
ParentDigital Equipment Corporation

MACRO-10 is an assembly language featuring powerful macro functionalities, developed for DEC's PDP-10 mainframe computers, notably the DECsystem-10 and DECSYSTEM-20 platforms. It functions as a two-pass assembler.

Programming examples

The following example illustrates a simple "Hello, world!" program written in MACRO-10 assembler for TOPS-10, showcasing its syntax and operational style:

<syntaxhighlight lang="nasm">

       TITLE   HELLO WORLD
       ; MACRO-10 'Hello world' example for TOPS-10
       SEARCH  UUOSYM          ; Activate UUO symbol definitions

LAB: ASCIZ /Hello, world! /  ; ASCII string terminated with NUL and CRLF

START: RESET  ; Set up job environment OUTPUT: OUTSTR LAB  ; Display string located at LAB

       MONRT.                  ; Return control to monitor
       JRST    OUTPUT          ; Repeat on CONTINUE signal
       END     START           ; Mark end of assembly and entry point

</syntaxhighlight>

When saved as , this source can be compiled, linked, and executed on TOPS-10 using the following commands:

<syntaxhighlight lang="nasm"> .COMPILE HELLO.MAC /DLIST MACRO: HELLO

EXIT

.LOAD HELLO LINK: Loading

EXIT

.SAVE HELLO saved

.RUN

Hello, world!

. </syntaxhighlight>

The /DLIST flag produces a comprehensive assembly listing that includes both the code and symbol information.

More advanced programs written in MACRO-10 include examples such as the "99 Bottles of Beer" song, demonstrating its suitability for complex tasks. Extensive collections of MACRO-10 source code for TOPS-10 and TOPS-20 are preserved within the Trailing Edge PDP-10 software archive.

External links