User Tools

Site Tools


cdc6500_survival_guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cdc6500_survival_guide [2017/11/08 23:04]
papa [References]
cdc6500_survival_guide [2020/08/12 06:12] (current)
hc9 [Local files]
Line 7: Line 7:
 This document is a short guide for those interested in exploring the 6500's interactive command environment. This document is a short guide for those interested in exploring the 6500's interactive command environment.
  
-//(Note: The author worked briefly with a CDC NOS computer 30 years ago, but all information below is based on study of the referenced manuals and experimentation on LC's 6500. The author apologizes for any inaccuracies and welcomes corrections and improvement suggestions.)//+//(Note: The primary author worked briefly with a CDC NOS computer 30 years ago, but all information below is based on study of the referenced manuals and experimentation on LC's 6500. We apologize for any inaccuracies and welcome corrections and improvement suggestions.)//
  
 ===== Connecting ===== ===== Connecting =====
Line 14: Line 14:
   - After the ''USER NUMBER'' prompt enter your user name (your input will be concealed by the row of Xs). You may need to type more slowly than you are used to with other systems.   - After the ''USER NUMBER'' prompt enter your user name (your input will be concealed by the row of Xs). You may need to type more slowly than you are used to with other systems.
   - After the ''PASSWORD'' prompt type your password (your input will be concealed by the row of Xs).   - After the ''PASSWORD'' prompt type your password (your input will be concealed by the row of Xs).
-  - After the ''RECOVER /SYSTEM:'' prompt enter a subsystem or other command. (Enter ''RECOVER'' to recover previously interrupted session.)+  - After the ''RECOVER /SYSTEM:'' prompt enter a subsystem name (see below) or other command. (Enter ''RECOVER'' to recover previously interrupted session.)
  
 <code> <code>
Line 42: Line 42:
 | ''ACCESS'' | Messaging with other users connected to the 6500. | | ''ACCESS'' | Messaging with other users connected to the 6500. |
 | ''BASIC'' | Interactive BASIC language programming environment. | | ''BASIC'' | Interactive BASIC language programming environment. |
-| ''BATCH'' | Create and run batch jobs for non-interactive programs. |+| ''BATCH'' | Create and run batch jobs (non-interactive programs) or interactively run system commands. This subsystem more closely resembles modern command-line shell environments.|
 | ''EXECUTE'' | Execute previously compiled programs. | | ''EXECUTE'' | Execute previously compiled programs. |
-| ''FORTRAN'' | Interactive Fortran language programming environment. Uses FORTRAN Version 5 compiler. |+| ''FORTRAN'' | Interactive Fortran language programming environment. Uses FORTRAN Version 5 compiler((Minnesota FORTRAN,  similar to FORTRAN Version 5)). |
 | ''FTNTS'' | Interactive Fortran language programming environment. Uses FORTRAN Extended Version 4 compiler. | | ''FTNTS'' | Interactive Fortran language programming environment. Uses FORTRAN Extended Version 4 compiler. |
 | ''NULL'' | A general-purpose environment for working with files and system status and settings (although most general commands are available in other subsystems as well). | | ''NULL'' | A general-purpose environment for working with files and system status and settings (although most general commands are available in other subsystems as well). |
Line 79: Line 79:
 Local files are the set of temporary files and direct access files (permanent files) currently open by a particular job or user session. Local files are the set of temporary files and direct access files (permanent files) currently open by a particular job or user session.
  
-File names my be up to seven alphanumeric (upper-case) characters and may not begin with a numeric character. The following file names are reserved by the system:+File names may be up to seven alphanumeric (upper-case) characters and may not begin with a numeric character. The following file names are reserved by the system:
  
 | INPUT | P8 | SCR3 | | INPUT | P8 | SCR3 |
Line 107: Line 107:
 ===== Programming Commands ===== ===== Programming Commands =====
  
 +There are several ways to develop programs using NOS 1.3 on the CDC 6500. Two of them are:
  
-The BASIC, FTNTS, and FORTRAN subsystems provide environments for interactively creating, modifying, debugging, and running programs:+(1) Using the BATCH subsystem the typical edit, compile, run development process can be used with ALGOL, BASIC, COBOL, FORTRAN 4 Extended, Minnesota FORTRAN, and Pascal. Refer to details on the BATCH subsystem, below. 
 + 
 +(2) Using the BASIC, FTNTS, and FORTRAN subsystems. These provide environments for interactively creating, modifying, debugging, and running programs:
  
 | ''BASIC'' | Enter the BASIC subsystem. Uses the BASIC programming language interpreter. | | ''BASIC'' | Enter the BASIC subsystem. Uses the BASIC programming language interpreter. |
 | ''FTNTS'' | Enter the FTNTS subsystem. Uses the FORTRAN Extended Version 4 compiler. | | ''FTNTS'' | Enter the FTNTS subsystem. Uses the FORTRAN Extended Version 4 compiler. |
-| ''FORTRAN'' | Enter the FORTRAN subsystem. Uses the FORTRAN Version 5 compiler. |+| ''FORTRAN'' | Enter the FORTRAN subsystem. Uses the FORTRAN Version 5((Minnesota FORTRAN,  similar to FORTRAN Version 5)) compiler. |
  
-The tree subsystems provide a development environment similar to the original Dartmouth BASIC and versions of Microsoft BASIC for microcomputers and early PCs.+These three subsystems provide a development environment similar to the original Dartmouth BASIC and versions of Microsoft BASIC for microcomputers and early PCs.
  
 ==== Program source files ==== ==== Program source files ====
Line 140: Line 143:
 | ''RUN\\ | ''RUN\\
 RNH\\ RNH\\
-RUN,MI=12625'' | For the BASIC subsystem, runs the primary file program. The second form omits printing of the system header. The third form is required to compile and run programs in the FTNTS subsystem. (The ''MI'' argument sets the compiler field length. As of this writing it is unknown if value 12625 is valid for all programs.) //Note: As of this wiriting, the author has not yet succeeded in compiling nor running a program with the FORTRAN subsystem.// |+RUN,MI=12625'' | For the BASIC subsystem, runs the primary file program. The second form omits printing of the system header. The third form may be needed to compile and run more complex programs. (The ''MI'' argument sets the compiler field length. As of this writing it is unknown if value 12625 is valid for all programs.) 
 + 
 +** FORTRAN subsystem example** 
 +Here the FORTRAN subsystem is selected, an existing program is loaded, listed, and run.  
 +<code> 
 +FORTRAN 
 +READY. 
 + 
 +OLD,TEST2 
 +LIST 
 + 
 + 99/09/10. 21.13.26. 
 +PROGRAM   TEST2 
 + 
 +00100 PROGRAM TEST2(OUTPUT) 
 +00110 INTEGER J 
 +00120 REAL Z,W,Q,Q2,Q3 
 +00130 Z=0.0 
 +00140 Q=0.0 
 +00150 DO 210 J=1,25 
 +00160 Z=SQRT(Q)+Z 
 +00170 W=SQRT(Q) 
 +00180 Q2=Q*Q 
 +00190 Q3=Q*Q*Q 
 +00200 PRINT 190,J,W,Q2,Q3 
 +00210 190 FORMAT(1X,I9,3(3H   ,F12.6)) 
 +00220 Q=Q+1.0 
 +00230 210 CONTINUE 
 +00240 W=Z/25.0 
 +00250 PRINT 230,W 
 +00260 230 FORMAT(1X,5HAVG  ,F12.6) 
 +00270 END 
 + 
 +READY. 
 + 
 +RUN 
 + 
 + 99/09/10. 21.13.38. 
 +PROGRAM   TEST2 
 + 
 +               0.             0.             0. 
 +               1.000000       1.000000       1.000000 
 +               1.414214       4.000000       8.000000 
 +... 
 +        24       4.795832     529.000000   12167.000000 
 +        25       4.898979     576.000000   13824.000000 
 + AVG      3.225351 
 + END. 
 + 
 +SRU      0.447 UNTS. 
 + 
 +RUN COMPLETE. 
 + 
 +READY. 
 +</code> 
 + 
 +** FTNTS subsystem example ** 
 +Here the FTNTS subsystem is selected, an existing program is loaded, listed, and run. Note the way the FORTRAN line numbers 190, 210, and 230 as specified in addition to the editing line numbers which do not make up part of the program 
 +<code> 
 +FTNTS 
 +READY. 
 + 
 +OLD,TEST1 
 +READY. 
 + 
 +LNH 
 + 
 +00100 PROGRAM TEST1(OUTPUT) 
 +00120 INTEGER J 
 +00130 REAL Z,Q 
 +00140 Z=0.0 
 +00150 Q=0.0 
 +00160 DO 210 J=1,25 
 +00170 Z=SQRT(Q)+Z 
 +00180 PRINT 190,J,SQRT(Q),Q*Q,Q*Q*Q 
 +00190 190 FORMAT(1X,I9,3(3H   ,F12.6)) 
 +00200 Q=Q+1.0 
 +00210 210 CONTINUE 
 +00220 PRINT 230,Z/25.0 
 +00230 230 FORMAT(1X,5HAVG: ,F12.6) 
 +00240 END 
 + 
 +READY. 
 + 
 +RUN 
 + 
 + 99/09/10. 20.42.34. 
 +PROGRAM   TEST1 
 + 
 +
 +1   LOAD MAP - TEST1    CYBER LOADER 1.4-485  99/09/10. 20.42.37.  PAGE     1 
 + 
 +... 
 +    .549 CP SECONDS              22100B CM STORAGE USED     3 TABLE MOVES 
 +... 
 + 
 +
 +               0.000000       0.000000       0.000000 
 +               1.000000       1.000000       1.000000 
 +               1.414214       4.000000       8.000000 
 +               1.732051       9.000000      27.000000 
 +               2.000000      16.000000      64.000000 
 +... 
 + 
 +</code>
  
 ===== Text Editor ===== ===== Text Editor =====
Line 147: Line 254:
 Although the programming subsystems include basic functionality for entering and modifying program source code in the primary file, the NOS Text Editor program (''EDIT'') provides both advanced editing functions and the ability to edit other local files besides the primary file. Although the programming subsystems include basic functionality for entering and modifying program source code in the primary file, the NOS Text Editor program (''EDIT'') provides both advanced editing functions and the ability to edit other local files besides the primary file.
  
-| ''EDIT\\ +| ''EDIT''\\ ''EDIT'',//file//\\ ''EDIT'',//file//,//mode// | Edit the primary file with Text Editor. The second form is for editing other local files. The third form is for specifying a file mode; ''N''=normal, ''AS''=ASCII.| 
-EDIT,''//file// | Edit the primary file with Text Editor. The second form is for editing other local files. |+| ''RESET''                 | Reset current line pointer to first line. | 
 +| ''SET'';                | Set the current-line pointer by moving it +/- "n" lines relative to the current position. | 
 +| ''F'':/abc/               | Find line with text "abc" and move the current-line pointer there. | 
 +| ''LIST'';n or ''L'';    | List "n" number of lines from the current line-pointer (pointer does not change). | 
 +| ''EXTRACT''               | Copies the current line to the string buffer (a.k.a. "clipboard")| 
 +| ''ADD''                   | Add one or more lines after the current line-pointer position| 
 +| ''ADD''//<CR>$<CR>//          | Pastes the string buffer content below the current line| 
 +| ''DELETE'';  or ''D'';    | Delete one or more lines beginning with the current line| 
 +| ''RS:''/abc/,/xyz/;     | Replace string "abc" with "xyz" in the current line "n" times|
 | ''END'' | Exit Text Editor | | ''END'' | Exit Text Editor |
 +
 +Here is an example session using the ''EDIT'' command to create and edit a simple ASCII text file. 
 +
 +<code>
 +/EDIT,test,AS  
 + BEGIN TEXT EDITING.
 +? add
 + ENTER TEXT.
 +? /This is a test file.
 +? It has multiple lines of text.
 +? This file demonstrates the edit command.
 +? This is line 4./
 + READY.
 +? list;*
 +This is a test file.
 +It has multiple lines of text.
 +This file demonstrates the edit command.
 +This is line 4.
 + -END OF FILE-
 +? add
 + ENTER TEXT.
 +? /Pointer at line 1, we insert a new line 2./
 + READY.
 +? list;*
 +This is a test file.
 +Pointer at line 1, we insert a new line 2.
 +It has multiple lines of text.
 +This file demonstrates the edit command.
 +This is line 4.
 + -END OF FILE-
 +? set;4
 +? list
 +This is line 4.
 +? delete
 + -END OF FILE-
 +? add
 + ENTER TEXT.
 +? /This is line 5./
 + READY.
 +? reset
 +? list;*
 +This is a test file.
 +Pointer at line 1, we insert a new line 2.
 +It has multiple lines of text.
 +This file demonstrates the edit command.
 +This is line 5.
 + -END OF FILE-
 +? end
 + END TEXT EDITING.
 +$EDIT,TEST,AS.
 +/SAVE,test
 +</code>
 +
 +===== Batch =====
 +
 +
 +The BATCH subsystem provides the ability to create and submit batch jobs as well as run system commands interactively. It is probably the closest to the modern shell or command-line environment.
 +
 +The typical process is as follows,
 +  * Create a new, empty, file
 +  * Add the program source to the file using the EDIT or XEDIT text editors
 +  * Save the program source file to permanent storage
 +  * Invoke the compiler for the program source language
 +  * Correct any reported errors
 +  * Recompile
 +  * Replace the file in permanent storage with the revised file
 +  * Invoke the compiled loadable-object file
 +
 +** COBOL **
 +Here is an example of creating, compiling, and running an example COBOL program.
 +It waits for entry of two integer values, calulates the product and prints the result.
 +
 +
 +<code>
 +/new,sample1
 +
 +/xedit,sample1,c
 + XEDIT 3.0.20
 +?? tabs 8,12,16,20
 +?? deftab ;
 +?? 
 + INPUT
 +? ;identification division.
 +? ;program-id products.
 +? ;environment division.
 +? ;configuration section.
 +? ;source-computer. CDC 6500.
 +? ;object-computer. CDC 6500.
 +? ;data division.
 +? ;working-storage section.
 +? ;01 result pic 9(9).
 +? ;01 mult1 pic 9(5).
 +? ;01 mult2 pic 9(4).
 +? ;procedure division.
 +? ;first-par.
 +? ;;accept mult1.  accept mult2.
 +? ;;multiply mult1 by mult2 giving result.
 +? ;;display "Answer: " result.
 +? ;;stop run.
 +
 + EDIT
 +??
 +?? quit
 +SAMPLE1 IS A LOCAL FILE
 +
 +/save,sample1
 +
 +/cobol,i=sample1
 +
 +/lgo
 +
 +S
 +? 65432
 +? 1065
 +ANSWER: 069685080
 +
 +/
 +</code>
 +
 +** Pascal **
 +Here is an exmample of loading an existing Pascal source file, listing it, compile, run.
 +The program displays a table of squares and square roots of the integers 1 to 20.
 +
 +<code>
 +/OLD,SAMPLE3
 +
 +/LIST
 +PROGRAM SMPL3(INPUT/,OUTPUT); 
 +VAR 
 +   V1,V2,V3 : REAL; 
 +   J : INTEGER; 
 +BEGIN 
 +   WRITELN('                    N                   N*N               SQRT(N)');
 +   FOR J := 1 TO 20 DO
 +   BEGIN
 +     V1 := J; 
 +     V2:= SQR(V1);
 +     V3:= SQRT(V1); 
 +     WRITELN(V1:22:12,V2:22:12,V3:22:12);
 +   END; 
 +END.
 +
 +/PASCAL(SAMPLE3)
 +...
 +     0.263 CP SECS,  44276B CM USED.
 +
 +/LGO
 +...
 +S
 +                    N                   N*N               SQRT(N) 
 +        1.000000000000        1.000000000000        1.000000000000
 +        2.000000000000        4.000000000000        1.414213562373
 +        3.000000000000        9.000000000000        1.732050807569
 +        4.000000000000       16.000000000000        2.000000000000
 +        5.000000000000       25.000000000000        2.236067977500
 +...
 +     0.129 CP SECS,   5725B CM USED.
 +/
 +</code>
 +
  
 ===== Messaging ===== ===== Messaging =====
Line 198: Line 473:
   - [[http://bitsavers.trailing-edge.com/pdf/cdc/cyber/nos/60435400C_NOS_Version_1_Reference_Manual_Volume_1_Dec76.pdf|NOS Version 1 Reference Manual Volume 1 of 2]] (PDF). Control Data Corporation. Dec. 3, 1976. Accessed Nov. 11, 2017.   - [[http://bitsavers.trailing-edge.com/pdf/cdc/cyber/nos/60435400C_NOS_Version_1_Reference_Manual_Volume_1_Dec76.pdf|NOS Version 1 Reference Manual Volume 1 of 2]] (PDF). Control Data Corporation. Dec. 3, 1976. Accessed Nov. 11, 2017.
   - [[http://bitsavers.trailing-edge.com/pdf/cdc/cyber/nos/60436100C_NOS_Version_1_Text_Editor_Ref_Mar76.pdf|NOS Version 1 Text Editor Reference Manual]] (PDF). Control Data Corporation. Mar. 8, 1976. Accessed Nov. 11, 2017.   - [[http://bitsavers.trailing-edge.com/pdf/cdc/cyber/nos/60436100C_NOS_Version_1_Text_Editor_Ref_Mar76.pdf|NOS Version 1 Text Editor Reference Manual]] (PDF). Control Data Corporation. Mar. 8, 1976. Accessed Nov. 11, 2017.
 +  - [[http://bitsavers.trailing-edge.com/pdf/cdc/cyber/lang/cobol/60191200_COBOL_Reference_Jun67.pdf|COBOL Reference Manual]] (PDF). Control Data Corporation. Jun. 1967. Accessed Sep. 10, 2019.
 +  - [[http://bitsavers.trailing-edge.com/pdf/cdc/cyber/lang/pascal/60497700A_Pascal_Version_1_Users_Man_Sep83.pdf|Pascal Version 1 Users Manual]] (PDF). Control Data Corporation. Sep. 1983. Accessed Sep. 9, 2019.
  
 ===== Future Improvements ===== ===== Future Improvements =====
Line 204: Line 481:
 The author would like to make the following improvements to this document: The author would like to make the following improvements to this document:
  
-Document compilation and execution of programs with FORTRAN subsystem. +  * Document compilation and execution of programs with FORTRAN subsystem. 
-Text Editor command guide. +  * XEDIT text editor command guide. 
-Batch subsystem guide. +  Batch subsystem guide continued, add FORTRAN and Pascal examples
-Execute subsystem guide.+  Execute subsystem guide.
  
cdc6500_survival_guide.1510182272.txt.gz · Last modified: 2017/11/08 23:04 by papa