MACRO-10
   HOME

TheInfoList



OR:

MACRO-10 is an assembly language with extensive macro facilities for DEC's
PDP-10 Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, espec ...
-based Mainframe computer systems, the
DECsystem-10 Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, especi ...
and the
DECSYSTEM-20 The DECSYSTEM-20 was a 36-bit Digital Equipment Corporation PDP-10 mainframe computer running the TOPS-20 operating system (products introduced in 1977). PDP-10 computers running the TOPS-10 operating system were labeled ''DECsystem-10'' as a ...
. MACRO-10 is implemented as a two-pass assembler.


Programming examples

A simple " Hello, world!" program in MACRO-10 assembler, to run under
TOPS-10 TOPS-10 System (''Timesharing / Total Operating System-10'') is a discontinued operating system from Digital Equipment Corporation (DEC) for the PDP-10 (or DECsystem-10) mainframe computer family. Launched in 1967, TOPS-10 evolved from the earlie ...
, adapted from a specimen in a large collection of "Hello World" programs in various languages: TITLE HELLO WORLD ; 'Hello world' in MACRO-10 for TOPS-10 SEARCH UUOSYM ; Make UUO symbol names available LAB: ASCIZ /Hello, world! / ; NUL-terminated ASCII string with CRLF START: RESET ; Initialise job to clean runtime state OUTPUT: OUTSTR LAB ; Output string starting at LAB: MONRT. ; Return to monitor JRST OUTPUT ; Restart at OUTPUT: if user CONTINUEs job END START ; End assembly, set program start address If this program is saved in the file , it can be assembled, linked and run like this (the TOPS-10 system prompt is the . at the start of lines): .COMPILE HELLO.MAC /DLIST MACRO: HELLO EXIT .LOAD HELLO LINK: Loading EXIT .SAVE HELLO saved .RUN Hello, world! . The assembly listing file generated by the /DLIST (Disk LISTing) option to the COMPILE command: HELLO WORLD MACRO %53B(1247) 17:29 7-Apr-:9 Page 1 HELLO MAC 7-Apr-:9 17:29 TITLE HELLO WORLD ; 'Hello world' in MACRO-10 for TOPS-10 SEARCH UUOSYM ; Make UUO symbol names available 000000' 110 145 154 154 157 LAB: ASCIZ /Hello, world! 000001' 054 040 167 157 162 000002' 154 144 041 015 012 / ; NUL-terminated ASCII string with CRLF 000003' 000 000 000 000 000 000004' 047 00 0 00 000000 START: RESET ; Initialise job to clean runtime state 000005' 051 03 0 00 000000' OUTPUT: OUTSTR LAB ; Output string starting at LAB: 000006' 047 01 0 00 000012 MONRT. ; Return to monitor 000007' 254 00 0 00 000005' JRST OUTPUT ; Restart at OUTPUT: if user CONTINUEs job 000004' END START ; End assembly, set program start address NO ERRORS DETECTED PROGRAM BREAK IS 000010 CPU TIME USED 58:25.100 36P CORE USED HELLO WORLD MACRO %53B(1247) 17:29 7-Apr-:9 Page S-1 HELLO MAC 7-Apr-:9 17:29 SYMBOL TABLE LAB 000000' MONRT. 047040 000012 OUTPUT 000005' OUTSTR 051140 000000 RESET 047000 000000 START 000004' The date ":9" is a
Year 2000 problem The year 2000 problem, also known as the Y2K problem, Y2K scare, millennium bug, Y2K bug, Y2K glitch, Y2K error, or simply Y2K refers to potential computer errors related to the formatting and storage of calendar data for dates in and after ...
. A more complex MACRO-10 example program, which renders one version of the
99 Bottles of Beer "99 Bottles of Beer" or "100 Bottles of Pop on the Wall" is a song dating to the mid-20th century. It is a traditional reverse counting song in both the United States and Canada. It is popular to sing on road trips, as it has a very repetitive ...
song, may be examined at the "99 Bottles of Beer" web site. For larger bodies of code, much of the MACRO-10 code for the TOPS-10 and TOPS-20 systems is available in the Trailing Edge PDP-10 tape archives.Trailing Edge PDP-10 software archive
/ref>


References


External links

* * * {{Authority control Assembly languages Digital Equipment Corporation