This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tops-20 [2020/05/06 23:08] smj |
tops-20 [2020/07/13 10:36] (current) setala Added a missing @ |
||
---|---|---|---|
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** | ||
Line 39: | Line 39: | ||
//NOTE: This formatting is punched card style - The first 5 and 6th columns are special// | //NOTE: This formatting is punched card style - The first 5 and 6th columns are special// | ||
- | @copy TTY: test.for | + | @copy TTY: test.for |
TTY: => TEST.FOR.1 | TTY: => TEST.FOR.1 | ||
| | ||
- | | + | |
| | ||
- | WRITE (5, 10) | + | WRITE (5, 10) ; |
- | 10 | + | 10 |
| | ||
- | END | + | END ;END the program |
- | ^Z | + | ^Z ; |
- | @type test.for | + | @type test.for |
| | ||
| | ||
- | WRITE (5, 10) | + | WRITE (5, 10) |
10 | 10 | ||
| | ||
- | 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 71: | 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. | ||