ELEMENTARY COMMANDS:

General command information ASK Y (EXPECTS A VALUE TO BE INPUT FOR Y) A Z (A IS THE ABBREVIATION FOR 'ASK' --- ALL COMMANDS A B2,X,NUMBER HAVE SINGLE LETTER ABBREVIATIONS) A "HOW MANY? "M (TYPES 'HOW MANY' THEN SETS M = TO THE RESPONSE) ASK A,B,C (ALLOWS THREE VARIABLES TO BE GIVEN VALUES) (SPACE, COMMA OR CARRIAGE RETURN WILL TERMINATE EACH NUMBER INPUT; TYPE A '_' (BACK ARROW) TO ERASE A PARTIALLY TYPED NUMBER --- IT MAY THEN BE RETYPED. ALT MODE LEAVE THE VARIABLE WITH ITS FORMER VALUE.) (AN INITIAL DIALOGUE OPTION PROVIDES AUTOMATIC PRINTING OF A ':' BY THE 'ASK' COMMAND) *ASK ["PRINT OUT IN QUOTES"] X [,Y,Z] COMMENT SQRT (COMMENTS ARE USED TO TELL ABOUT PROGRAM) CONTINUE (DUMMY LINE) C PRINT ROUTINE *C (LINES BEGINNING WITH A 'C' WILL BE IGNORED) DO 7.24 (TELLS FOCAL TO EXECUTE LINE 7.24 THEN RETURN D 4.48 TO THE COMMAND FOLLOWING THE 'DO') DO 7 (EXECUTES GROUP 7) D G1;D 7.6 (EXECUTES LINE (OR GROUP) G1 THEN LINE 7.6) *DO [LINE OR GROUP NUMBER] ERASE 2.17 (DELETES LINE 2.17 FROM INDIRECT PROGRAM) E 3 (DELETES ANY GROUP 3 LINES --- 3.01 THROUGH 3.99) ERASE (ZEROES ALL VARIABLES) ERASE ALL (ERASES ENTIRE INDIRECT PROGRAM) *ERASE [LINE OR GROUP NUMBER] (ZEROES VARIABLES IF NO NUMBER GIVEN) FOR P=1,7;TYPE 3 (OUTPUTS A '3' SEVEN TIMES) FOR J=1,5;DO 17.1 (DOES LINE 17.1, FIVE TIMES) F X=2,2,8;T X/5,! (OUTPUTS .4 .8 1.2 AND 1.6 ) FOR Z=1,Y;DO 7 (DOES GROUP 7, Y TIMES) *FOR X=E1[,E2],E3;[COMMAND TO BE REPEATED] ('FOR' COMMANDS REPEAT AND ADD 1 (OR 'E2') TO 'E1' EACH TIME; THEN GO TO NEXT LINE WHEN 'E1' EXCEEDS 'E3'.) GO 8.17 (STARTS EXECUTING PROGRAM AT LINE 8.17) GOTO 3.1 (STARTS EXECUTING PROGRAM AT LINE 3.1) GO (STARTS EXECUTING PROGRAM AT LOWEST LINE NUMBER) G (SAME) GO ? ('TRACE FEATURE' -- PRINTS PROGRAM DURING EXECUTION) G X (STARTS EXECUTING PROGRAM AT LINE X) *GO [LINE NUMBER] (STARTS EXECUTING INDIRECT PROGRAM AT LINE L1) I (H-5)1.3,1.5,1.7 ('IF' CHECKS THE VALUE INSIDE THE PARENTHESES) IF (Y)2.7,1.2,L1 (FOCAL GOES TO LINE 2.7,1.2 OR L1 IF Y IS -, 0, OR +) I (B-3)2.8,7.9; (GOES TO NEXT COMMAND IF (B-3) IS POSITIVE) I (Z)2.7;T 21 (IF Z IS LESS THAN 0 --- THEN 2.7; OTHERWISE 'TYPE 21') I (G)2.1,L1,2.4 (IF G=0 THEN GOES TO LINE L1) *IF (E1)L1[,L2,L3] (NEXT EXECUTES LINE L1, L2, OR L3 DEPENDING ON WHETHER E1 IS -, 0, OR +) 'MODIFY 3.72' FOLLOWED BY A 'RETURN' AND THE LETTER 'X' WILL CAUSE LINE 3.72 TO BE TYPED THROUGH ITS FIRST 'X'. YOU MAY THEN: 1) TYPE IN REST OF REVISED LINE AND HIT 'RETURN' 2) USE 'RUB OUT' TO ERASE SINGLE CHARACTERS 3) HIT 'LINE FEED' TO KEEP REMAINDER OF OLD LINE 4) HIT CTRL/L TO GO TO NEXT OCCURRENCE OF 'X' 5) HIT CTRL/BELL TO CHANGE SEARCH CHARACTER; THEN HIT NEW CHARACTER 6) HIT '_' (BACK ARROW) TO DELETE LINE OVER TO LEFT MARGIN *MODIFY L1 C ('C' IS THE PARTICULAR SEARCH CHARACTER CHOSEN) Q (ABBREVIATION) *QUIT (TERMINATES PROGRAM EXECUTION)

See library exit to return to operating system




R                  (ABBREVIATION)

*RETURN            (ALLOWS ESCAPE FROM A 'DO LOOP' TO THE
                     COMMAND FOLLOWING THE 'DO' OR 'LIBRARY GOSUB')





SET Y=37           (CAUSES 'Y' TO TAKE THE VALUE 37)
S A=110/P+32       (CAUSES 'A' TO ASSUME THE VALUE OF 110/P+32)
S Y=Y+1            (SETS THE NEW VALUE OF Y = 1 PLUS OLD VALUE)
S Z=#;T Z          (PERMITS TYPING VALUE OF PROTECTED VARIABLE '#')
S #=0              (ONLY WAY TO ZERO PROTECTED VARIABLE '#')

*SET Y=gt;





TYPE 3             (OUTPUTS A 3 ON THE TELEPRINTER OR OTHER OUTPUT DEVICE)
T A                (OUTPUTS THE VALUE OF A)
T X/Y-1            (OUTPUTS THE VALUE OF THE EXPRESSION X/Y-1)
T "A"!"B"!"C"!     (OUTPUTS 'A', 'B' AND 'C' IN A VERTICAL ROW)
T !                (OUTPUTS A RETURN/LINE FEED)
T #                (OUTPUTS A CARRIAGE RETURN WITHOUT A LINE FEED)
T (#)              (OUTPUTS VALUE OF SYSTEM STATUS VARIABLE '#')
T "ANS: ",26+5     (OUTPUTS 'ANS:  31'
T :8,"A"           (OUTPUTS 'A' IN POSITION 8 ON LINE)
T $                (OUTPUTS THE SYMBOL TABLE)
T %10.09           (SETS THE OUTPUT FORMAT TO ALLOW UP TO 10 DIGITS
                     TO BE PRINTED, OF WHICH 9 MAY BE DECIMAL PLACES)
T %                (FORMATS OUTPUT IN POWERS-OF-TEN NOTATION)
(AN INITIAL DIALOGUE OPTION PROVIDES AUTOMATIC PRINTING OF AN '=' BY
THE'TYPE' COMMAND)

*TYPE [NUMBERS, VARIABLES, EXPRESSIONS, TEXT IN QUOTES, !,#,:,$ OR %]





WRITE 2.27         (OUTPUTS LINE 2.27 OF THE INDIRECT PROGRAM)
W 2                (OUTPUTS GROUP 2)
WRITE ALL          (OUTPUTS ENTIRE INDIRECT PROGRAM)
W                  (SAME)
W X                (OUTPUTS GROUP OR LINE GIVEN BY 'X')

*WRITE [GROUP OR LINE NUMBER]    (LISTS PROGRAM)



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search

Mirror site if this site is slow highgate.comm.sfu.ca