MACRO-11
   HOME

TheInfoList



OR:

MACRO-11 is an
assembly language In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
with macro facilities, designed for
PDP-11 The PDP–11 is a series of 16-bit minicomputers originally sold by Digital Equipment Corporation (DEC) from 1970 into the late 1990s, one of a set of products in the Programmed Data Processor (PDP) series. In total, around 600,000 PDP-11s of a ...
minicomputer A minicomputer, or colloquially mini, is a type of general-purpose computer mostly developed from the mid-1960s, built significantly smaller and sold at a much lower price than mainframe computers . By 21st century-standards however, a mini is ...
family from
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president until ...
(DEC). It is the successor to Program Assembler Loader (
PAL-11R PAL-11R is an assembly language, and an assembler, for the PDP-11's disk operating system, DOS-11 BATCH-11/DOS-11, also known simply as DOS-11, is a discontinued operating system by Digital Equipment Corporation (DEC) of Maynard, Massachusetts, ...
), an earlier version of the PDP-11 assembly language without macro facilities. MACRO-11 was supported on all DEC PDP-11 operating systems. PDP-11
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
systems also include an assembler (named '' as''), structurally similar to MACRO-11, but with different syntax and fewer features. The MACRO-11 assembler (and programs created by it) could also run under the
RSX-11 RSX-11 is a discontinued family of multi-user real-time operating systems for PDP-11 computers created by Digital Equipment Corporation. In widespread use through the late 1970s and early 1980s, RSX-11 was influential in the development of later ...
compatibility mode of
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Op ...
on VAX.


Programming example

A complete
"Hello, World!" program A "Hello, World!" program is usually a simple computer program that emits (or displays) to the screen (often the Console application, console) a message similar to "Hello, World!". A small piece of code in most general-purpose programming languag ...
in PDP-11 macro assembler, to run under
RT-11 RT-11 (Real-time 11) is a discontinued small, low-end, single-user real-time operating system for the full line of Digital Equipment Corporation PDP-11 16-bit computers. RT-11 was first implemented in 1970. It was widely used for real-time compu ...
: .TITLE HELLO WORLD .MCALL .TTYOUT,.EXIT HELLO:: MOV #MSG,R1 ;STARTING ADDRESS OF STRING 1$: MOVB (R1)+,R0 ;FETCH NEXT CHARACTER BEQ DONE ;IF ZERO, EXIT LOOP .TTYOUT ;OTHERWISE PRINT IT BR 1$ ;REPEAT LOOP DONE: .EXIT MSG: .ASCIZ /Hello, world!/ .END HELLO The .MCALL pseudo-op warns the assembler that the code will be using the .TTYOUT and .EXIT macros. The .TTYOUT and .EXIT macros are defined in the standard system macro library to expand to the EMT instructions to call the RT-11 monitor to perform the requested functions. If this file is , the RT-11 commands to assemble, link and run (with console output shown) are as follows: .MACRO HELLO ERRORS DETECTED: 0 .LINK HELLO .R HELLO Hello, world! . (The RT-11 command prompt is ".") For a more complicated example of MACRO-11 code, two examples chosen at random are Kevin Murrell's KPUN.MAC, or Farba Research's JULIAN routine. More extensive libraries of PDP-11 code can be found in the Metalab freeware and Trailing Edge archives.Trailing Edge
/ref>


References


External links


Original documentation (RSX11M_V2)
* Michael Singer, PDP-11. Assembler Language Programming and Machine Organization, John Wiley & Sons, NY: 1980. Assembly languages PDP-11 Digital Equipment Corporation OpenVMS software {{Prog-lang-stub