Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

MACRO-10

From Wikipedia, the free encyclopedia
Assembly language

MACRO-10 is anassembly language with extensivemacro facilities forDEC'sPDP-10-basedMainframe computer systems, theDECsystem-10 and theDECSYSTEM-20. MACRO-10 is implemented as atwo-pass assembler.

Programming examples

[edit]

A simple "Hello, world!" program in MACRO-10 assembler, to run underTOPS-10, adapted from a specimen in a large collection of "Hello World" programs in various languages:[1]

TITLEHELLOWORLD; 'Hello world' in MACRO-10 for TOPS-10SEARCHUUOSYM; Make UUO symbol names availableLAB:ASCIZ/Hello,world!/; NUL-terminated ASCII string with CRLFSTART:RESET; Initialise job to clean runtime stateOUTPUT:OUTSTRLAB; Output string starting at LAB:MONRT.; Return to monitorJRSTOUTPUT; Restart at OUTPUT: if user CONTINUEs jobENDSTART; End assembly, set program start address

If this program is saved in the fileHELLO.MAC, it can be assembled, linked and run like this (the TOPS-10 system prompt is the. at the start of lines):

.COMPILEHELLO.MAC/DLISTMACRO:HELLOEXIT.LOADHELLOLINK:LoadingEXIT.SAVEHELLOsaved.RUNHello,world!.

The assembly listing file generated by the/DLIST (Disk LISTing) option to theCOMPILE command:

HELLOWORLDMACRO%53B(1247)17:297-Apr-:9Page1HELLOMAC7-Apr-:917:29TITLEHELLOWORLD; 'Hello world' in MACRO-10 for TOPS-10SEARCHUUOSYM; Make UUO symbol names available000000'110145154154157LAB:ASCIZ/Hello,world!000001'054040167157162000002'154144041015012/; NUL-terminated ASCII string with CRLF000003'000000000000000000004'04700000000000START:RESET; Initialise job to clean runtime state000005'05103000000000'OUTPUT:OUTSTRLAB; Output string starting at LAB:000006'04701000000012MONRT.; Return to monitor000007'25400000000005'JRSTOUTPUT; Restart at OUTPUT: if user CONTINUEs job000004'ENDSTART; End assembly, set program start addressNOERRORSDETECTEDPROGRAMBREAKIS000010CPUTIMEUSED58:25.10036PCOREUSEDHELLOWORLDMACRO%53B(1247)17:297-Apr-:9PageS-1HELLOMAC7-Apr-:917:29SYMBOLTABLELAB000000'MONRT.047040000012OUTPUT000005'OUTSTR051140000000RESET047000000000START000004'

The date ":9" is aYear 2000 problem.A more complex MACRO-10 example program, which renders one version of the99 Bottles of Beer song, may be examined at the "99 Bottles of Beer" web site.[2]

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.[3]

References

[edit]
  1. ^Wolfram Rösler,"The Hello World Collection". Retrieved on 16 November 2016.
  2. ^"99 Bottles of Beer" Retrieved on 10 April 2009.
  3. ^Trailing Edge PDP-10 software archive

External links

[edit]
  • DECsystem-10 Macro Assembler Reference Manual(PDF). Maynard, Massachusetts: Digital Equipment Corporation. April 1978. Retrieved2010-07-08.
  • Singer, Michael (1978).Introduction to DECsystem-10 Assembler Language Programming. New York: John Wiley & Sons. p. 145.ISBN 0-471-03458-4.
  • Gorin, Ralph E (1981).Introduction to DECSYSTEM-20 Assembly Language Programming. Bedford, Massachusetts: Digital Press. p. 539.ISBN 0-932376-12-6.
Key people
Instruction set
architectures
,
processors
PDP-11
VAX
Alpha
Other
Computer
terminals
Operating
systems
Programming
languages
Character sets
Bus standards
Otherhardware
Related topics
Authority control databases: NationalEdit this at Wikidata
Retrieved from "https://en.wikipedia.org/w/index.php?title=MACRO-10&oldid=1170508173"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp