This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
tops-20 [2020/05/06 23:06] smj |
tops-20 [2020/05/06 23:39] smj |
||
---|---|---|---|
Line 33: | Line 33: | ||
**PROGRAMMING EXAMPLES USING " | **PROGRAMMING EXAMPLES USING " | ||
- | TOPS-20 supports many programming languages using a standard COMPILE/ | + | TOPS-20 supports many programming languages using a standard COMPILE/ |
**FORTRAN-77** | **FORTRAN-77** | ||
- | | + | //NOTE: This formatting is punched card style - The first 5 and 6th columns are special// |
+ | |||
+ | | ||
TTY: => TEST.FOR.1 | 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) | WRITE (5, 10) | ||
10 | 10 | ||
- | | ||
- | END | ||
- | ^Z | ||
- | @type test.for | ||
- | PROGRAM TEST | ||
- | | ||
- | WRITE (5, 10) | ||
- | 10 FORMAT(' | ||
| | ||
- | END | + | END |
- | @compile test | + | @compile test ;COMPILE the file TEST |
- | FORTRAN: TEST | + | FORTRAN: TEST ;COMPILE determined TEST is a FORTRAN program |
- | TEST | + | TEST |
- | @load test | + | @load test ;LOAD the file (or EXECUTE TEST to LOAD and RUN) |
LINK: | LINK: | ||
- | @save test | + | @save test ;SAVE the loaded program to a .EXE file |
| | ||
@v test.* | @v test.* | ||
Line 69: | Line 71: | ||
| | ||
Total of 8 pages in 3 files | 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. | ||