This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tops-20 [2020/03/25 21:13] smj |
tops-20 [2020/07/13 10:36] setala Added a missing @ |
||
---|---|---|---|
Line 30: | Line 30: | ||
| < | | < | ||
| < | | < | ||
+ | |||
+ | **PROGRAMMING EXAMPLES USING " | ||
+ | |||
+ | TOPS-20 supports many programming languages using a standard COMPILE/ | ||
+ | |||
+ | **FORTRAN-77** | ||
+ | |||
+ | //NOTE: This formatting is punched card style - The first 5 and 6th columns are special// | ||
+ | |||
+ | @copy TTY: test.for | ||
+ | TTY: => TEST.FOR.1 | ||
+ | | ||
+ | | ||
+ | | ||
+ | WRITE (5, 10) ;OUTPUT to the terminal (UNIT 5) at line 10 | ||
+ | 10 | ||
+ | | ||
+ | | ||
+ | ^Z ;CTRL-Z closes the file | ||
+ | @type test.for | ||
+ | | ||
+ | | ||
+ | WRITE (5, 10) | ||
+ | 10 | ||
+ | | ||
+ | END | ||
+ | @compile test ; | ||
+ | FORTRAN: TEST ; | ||
+ | TEST ;TEST is now written out as a .REL file | ||
+ | @load test ;LOAD the file (or EXECUTE TEST to LOAD and RUN) | ||
+ | LINK: | ||
+ | @save test ;SAVE the loaded program to a .EXE file | ||
+ | | ||
+ | @v test.* | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Total of 8 pages in 3 files | ||
+ | |||
+ | | ||
+ | | ||
+ | CPU time 0.09 | ||
+ | |||
+ | For an excellent summary to get started with FORTRAN on TOPS-20, check out | ||
+ | [[http:// | ||
+ | |||
+ | **MACRO-20** | ||
+ | |||
+ | MACRO is the assembler on TOPS-20. | ||
+ | |||
+ | @COPY TTY: | ||
+ | title hello | ||
+ | |||
+ | entry output | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | / | ||
+ | | ||
+ | | ||
+ | end output | ||
+ | ^Z | ||
+ | |||
+ | @type hello.mac | ||
+ | title hello | ||
+ | |||
+ | entry output | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | / | ||
+ | | ||
+ | | ||
+ | end output | ||
+ | | ||
+ | | ||
+ | |||
+ | EXIT | ||
+ | @load hello | ||
+ | | ||
+ | @save hello | ||
+ | HELLO.EXE.1 Saved | ||
+ | | ||
+ | Hello there. | ||
+ | |||
+ | |||
+ | Scans of original user and reference manuals can be found at: | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||