d
i
g
i
t
a
l
digital equipment corporation · maynard, massachusetts
MEMORY ADDRESS
EMA
RUN
MISCELLANEOUS
WORDS AND PHRASES LISTED UNDER MISCELLANEOUS IN THE INDEX BUT NOT GIVEN IN THE 'BULK' PRINT OUT ARE FOUND UNDER THEIR OWN NAMES. 'FILES', FOR EXAMPLE, IS DESCRIBED UNDER 'FILE COMMANDS'. ***** CHANGES FROM FOCAL,1969: PROGRAMS WRITTEN IN FOCAL,1969 SHOULD REQUIRE ONLY ONE CHANGE TO RUN UNDER PS/8 FOCAL,1971: THE INPUT DEVICE IS SWITCHED TO THE HIGH SPEED PAPER TAPE READER WITH THE 'OPEN INPUT PTR:' COMMAND AND SWITCHED BACK TO THE TERMINAL WITH 'OPEN INPUT TTY:,ECHO' INSTEAD OF WITH THE '*' COMMAND OF FOCAL,1969. OTHER CHANGES INCLUDE: 1) EXTENDED LIBRARY FEATURES WITH DEVICE-INDEPENDENT CHAINING AND SUBROUTINE CALLS BETWEEN PROGRAMS. 2) FILE READING AND WRITING COMMANDS, 10 DIGIT PRECISION, AND/OR STANDARD TRIG FUNCTIONS, WHICH MAY BE DELETED BY THE INITIAL DIALOGUE TO ALLOW UP TO 222 VARIABLES WITH 5500 CHARACTER PROGRAMS; WITH ALL FEATURES RETAINED, 98 VARIABLES AND 3500 CHARACTERS REMAIN. 3) COMPUTED LINE NUMBERS. 4) TABULATION. 5) IMPROVED DISTRIBUTION AND 'PSEUDO-RANDOM' INITIALIZATION OF 'FRAN()', THE PSEUDO-RANDOM NUMBER FUNCTION. 6) UNLIMITED LINE LENGTHS. 7) CHARACTER MANIPULATIONS HANDLED WITH 'FIN()' AND 'FOUT()'. 8) FSGN(0)=0 [FSGN(0)=1 IN FOCAL,1969] 9) 'ERASE ALL' AND 'MODIFY' DO NOT ERASE VARIABLES. 10) IN ADDITION TO THE FDIS() DISPLAY FUNCTION FOR DEC'S 34D DISPLAY, VERSIONS ARE AVAILABLE WITH DISPLAY AND JOYSTICK FUNCTIONS FOR THE TEKTRONIX T-4002 GRAPHIC COMPUTER TERMINAL. 11) 3 SPECIAL VARIABLES ARE PROTECTED FROM THE 'ERASE' COMMAND --- '!', '"',AND '#'. '#' IS SET TO 1 BY THE INITIAL DIALOGUE IF ALL OPTIONAL FEATURES OF PS/8 FOCAL ARE DELETED, AND TO 2310 IF STANDARD FEATURES ARE RETAINED. 12) PS/8 FOCAL'S STARTING ADDRESS IS 10200 (FIELD 1). CTRL/P IS THE BREAK CHARACTER ------ -- --- ----- --------- NOTE: PS/8 FOCAL DATA FILES ARE COMPATIBLE WITH EDIT AND TECO-8; HOWEVER, PS/8 FOCAL PROGRAM FILES ARE SAVED AS CORE IMAGES. EXPRESSIONS --- AN EVALUATABLE GROUP OF NUMBERS OR VARIABLES: (2+3*X) OR (22/7) HIGH SPEED PAPER TAPE READER CAN READ IN FOCAL PROGRAMS: 1) TYPE 'OPEN INPUT PTR:' 2) AFTER '^' IS TYPED OUT, HIT SPACE BAR TO READ TAPE 3) AFTER '?' IS TYPED OUT, HIT 'CTRL/P' THE FOLLOWING 3 LINE PROGRAM WILL ASK FOR 10 NUMBERS FROM THE READER: 10.60 OPEN INPUT PTR: 10.65 FOR X=1,10;ASK A(X) 10.70 OPEN INPUT TTY:,ECHO;COMMENT --- RESTORES TERMINAL TO NORMAL INITIAL DIALOGUE --- ASK FOCAL'S INITIAL DIALOGUE FOR 'HELP' WHICH WILL LIST OPTIONS OTHER THAN STANDARD FEATURES. '#' IS THE SYSTEM STATUS VARIABLE (PROTECTED) AND IS 'SET' TO THE PRODUCT OF CODES REPRESENTING FEATURES CHOSEN IN THE INITIAL DIALOGUE. FEATURE CODE ------------------------------------------- ---- '0' NO OPTIONAL FEATURES 1 '1' FSIN AND FCOS FUNCTIONS 2 '2' FSIN, FCOS, FLOG, FEXP AND FATN 6 '3' EXTENDED PRECISION (10 DIGITS) 5 '4' FILE COMMADS 7 '5' LEADING SPACE IN 'TYPE' 11 '6' '=' AUTOMATICALLY PRINTED BY 'TYPE' 13 '7' ':' AUTOMATICALLY PRINTED BY 'ASK' 17 '8' '&' IN POWERS-OF-TEN NOTATION -1 '9' FEATURES 2,3,4 210 'YES' STANDARD FETURES 2,3,4,5 2310 LINE NUMBERS --- MAY RANGE FROM 1.01 THROUGH 31.99 BUT MUST NOT INCLUDE INTEGERS. VARIABLES NOT STARTING WITH 'A' MAY BE USED IN PLACE OF LINE NUMBERS (EXAMPLE: 'GOTO X'). GROUP NUMBERS ARE INTEGERS FROM 1 - 31 AND REFERENCE GROUPS OF LINES WITH 'DO', 'WRITE' AND 'ERASE' COMMANDS. MERGING PROGRAMS --- 'A' AND 'B' IS DONE WITH A SERIES OF COMMANDS WHICH CONVERT 'A' INTO A DATA FILE (PS/8 EDITOR COMPATIBLE) AND THEN BRING IT IN 'ON TOP' OF PROGRAM 'B': 1) LIBRARY CALL A 2) OPEN INPUT TTY: 3) OPEN OUTPUT A (STEPS 3-5 WILL NOT PRINT OUT) 4) SET B=FOUT(223);W 5) SET B=FOUT(223);OUTPUT CLOSE;OPEN INPUT TTY:,ECHO 6) LIBRARY CALL B 7) OPEN INPUT A 8) [HIT 'CTRL/P'; WAIT FOR '?01.00'] 9) LIBRARY DELETE A.FD THE MERGED PROGRAM WILL NOW BE IN YOUR PROGRAM BUFFER. PRECISION --- IF YOU CHOOSE TO DELETE EXTENDED PRECISION (10 DIGITS) IN THE INITIAL DIALOGUE, YOU WILL HAVE ROOM FOR 20% MORE VARIABLES PIP --- A PS/8 SYSTEM PROGRAM WHICH CAN LIST YOUR ENTIRE DEVICE DIRECTORY BY TYPING 'R PIP' TO PS/8 MONITOR THEN '/L'. HIT 'CTRL/C' TO RETURN TO PS/8 MONITOR. BE SURE TO USE '/I' OPTION WHEN TRANSFERRING PROGRAMS. PROGRAM NAMES --- UP TO SIX ALPHABETIC OR NUMERIC CHARACTERS. FOCAL ASSUMES AN .FC OR .FD EXTENSION (PROGRAM OR DATA). PROGRAM SIZE --- WITH STANDARD FEATURES OF PS/8 FOCAL,1971 RETAINED, PROGRAMS MAY BE ABOUT 3500 CHARACTERS LONG --- 7 BLOCKS. IF FILES ARE DELETED IN THE INITIAL DIALOGUE, 5500 CHARACTER PROGRAMS ARE POSSIBLE. PUSHDOWN LIST OVERFLOW --- WHEN TOO MANY 'DO' OR 'LIBRARY GOSUB' COMMANDS HAVE BEEN GIVEN WITHOUT A 'RETURN', FOCAL'S PUSHDOWN LIST BECOMES FILLED. REMEDY: REDUCE NUMBER OF BLOCKS IN PROGRAM LENGTH. STRINGS --- ARE ANY SERIES OF CHARACTERS SUCH AS: HELLO 122.5 $99.95 NOW IS THE TIME FOR ALL GOOD MEN .... TEST34 THE ABOVE STRINGS WERE PRINTED OUT ['122.5' IS ALSO A NUMBER] BY SURROUNDING THEM WITH QUOTATION MARKS IN A TYPE STATEMENT AS IN LINE 22.25: 22.25 TYPE "HELLO"! STRINGS MAY ALSO BE PRINTED OUT CHARACTER BY CHARACTER USING THE 'FOUT()' FUNCTION; INPUT OF STRINGS MAY BE HANDLED WITH THE 'FIN()' FUNCTION ---- HELP CAN REVIEW 'FIN', 'FOUT', AND 'QUOTATION MARKS' FOR YOU. ALSO SEE THE FOCAL PROGRAM IN THE INITIAL DIALOGUE. THE ASK COMMAND MAY BE USED TO INPUT SHORT STRINGS FOR COMPARISON PURPOSES. OBSERVE THE FOLLOWING SUBROUTINE FIRST WRITTEN THEN EXECUTED: 22.78 COMMENT: 'YES OR NO' SUBROUTINE 22.80 ASK "ANSWER YES OR NO ? ",AN 22.82 IF (AN-0YES)22.84,22.86 22.84 IF (AN-0NO)22.8,22.88,22.8 22.86 SET X=2;RETURN 22.88 SET X=1;RETURN *GO 22.8 ANSWER YES OR NO ? YEP ANSWER YES OR NO ? NOPE ANSWER YES OR NO ? YES PROGRAM CONTROL WOULD THEN RETURN TO COMMAND FOLLOWING SUBROUTINE CALL ('DO' OR 'LIBRARY GOSUB') WITH X EQUAL 2. SUBSCRIPTING --- VARIABLES MAY HAVE UNIQUE SUBSCRIPTS FROM -2048 THROUGH 2047 ALTHOUGH THE TOTAL NUMBER OF VARIABLES IS LIMITED BY CHOICES MADE IN THE INITIAL DIALOGUE. NOTE THAT THE SYMBOL TABLE WILL ACCURATELY OUTPUT ONLY THE SUBSCRIPTS BETWEEN 0 AND 99. VARIABLES --- MAY BE ONE OR TWO CHARACTERS SUCH AS: A, X, Z7, P2, PI, AB IF 'ABCDEFG' WERE USED AS A VARIABLE, ONLY 'AB' WOULD BE SIGNIFICANT. VARIABLES MAY NOT START WITH AN 'F' OR A DIGIT. 99 VARIABLES ARE AVAILABLE IF ALL FEATURES OF PS/8 FOCAL ARE RETAINED. UP TO 222 REGULAR VARIBLES CAN BE MADE AVAILABLE BY DELETING FEATURES THROUGH THE INITIAL DIALOGUE '!', '"', AND '#' ARE PROTECTED VARIABLES AND CANNOT BE 'TYPED', 'ASKED' OR 'ERASED' DIRECTLY, BUT MAY BE 'SET' AND OTHERWISE USED AS REGULAR VARIABLES. '#', THE SYSTEM STATUS VARIABLE, IS 'SET' TO SPECIAL CODES BY THE INITIAL DIALOGUE. ERROR CODES VALID ONLY FOR 6/1/71 VERSION OF PS/8 FOCAL CODE EXPLANATION ------ -------------------------------------------- ?00.00 MANUAL START FROM CONSOLE ?01.00 BREAK FROM KEYBOARD VIA 'CTRL/P' ?01.40 BAD LINE NUMBER ?01.91 GROUP NUMBER LARGER THAN 31 ?01.;3 ZERO IS ILLEGAL LINE NUMBER ?02.32 'DO' REFERENCED NON-EXISTENT GROUP ?02.52 'DO' REFERENCED NON-EXISTENT LINE ?03.05 NON-EXISTENT LINE AFTER 'GOTO' OR 'IF' ?03.28 ILLEGAL COMMAND ?04.39 BAD VARIABLE IN 'FOR' OR 'SET' COMMAND ?04.52 EXCESS RIGHT TERMINATORS ?04.60 ILLEGAL TERMINATOR IN 'FOR' OR 'SET' COMMAND ?04.:3 MISSING ARGUMENT IN DISPLAY FUNCTION ?05.48 BAD ARGUMENT IN 'MODIFY' COMMAND ?06.06 ILLEGAL USE OF A FUNCTION OR NUMBER ?06.54 TOO MANY VARIABLES ?07.38 NO OPERATOR BEFORE PARENTHESIS ?07.:9 FUNCTION ARGUMENT MISSING ?07.;6 ILLEGAL FUNCTION OR DOUBLE OPERATORS ?08.47 ENCLOSURES DO NOT MATCH ?09.11 BAD ARGUMENT IN 'ERASE' COMMAND ?10.:5 STORAGE FILLED BY TEXT ?11.35 INPUT BUFFER OVERFLOW ?15.28 BAD RESTORE COMMAND ?15.;1 ATTEMPT TO WRITE PAST END-OF-FILE ?20.34 LOGARITHM OF ZERO REQUESTED ?22.23 NO OUTPUT FILE TO RESTORE ?22.51 BAD FILES 'OPEN' COMMAND ?23.05 DATA FILE NOT FOUND ?23.15 NO INPUT FILE TO RESTORE ?23.36 TOO MANY DIGITS IN NUMBER ?23.39 PUSHDOWN OVERFLOW; PROGRAM TOO LONG ?24.60 TWO PERIODS IN FILE NAME OR NO NAME ?25.37 BAD DEVICE OR 2 PAGE HANDLER ?26.18 BAD LIBRARY COMMAND ?26.58 NO PROGRAM NAMED BY 'SAVE' COMMAND ?26.99 EXPONENT TOO LARGE OR NEGATIVE ?27.10 PROGRAM NOT FOUND ?27.14 'LIBRARY CALL' FROM NON-DIRECTORY DEVICE ?28.06 'LIBRARY LIST' OF NON-DIRECTORY DEVICE ?28.73 DIVISION BY ZERO ?29.53 FILE ALREADY DELETED ?29.68 DEVICE ERROR: WRITE LOCK OR PARITY ?29.91 CANNOT OPEN OUTPUT FILE ?30.05 IMAGINARY SQUARE ROOTS REQUIRED ?31.<7 UNAVAILABLE COMMAND OR FUNCTION ? ATTEMPT TO READ PAST END-OF-FILE (INPUT IS SWITCHED TO TERMINAL AND PROGRAM CONTINUES) NOTE: 'TYPE =', 'TYPE )', 'TYPE ]', OR 'TYPE >' OUTPUTS A STRING OF ZEROES. THIS CAN BE INTERRUPTED BY TYPING 'CTRL/P'.
Summary of Commands
ELEMENTARY COMMANDS *ASK <X> ..........ACCEPT VALUE OF X FROM INPUT DEVICE *COMMENT ..........................IGNORE REST OF LINE *DO [LINE OR GROUP NUMBER] ............SUBROUTINE CALL *ERASE .................................ZERO VARIABLES *ERASE <LINE OR GROUP NUMBER> ....DELETE LINE OR GROUP *ERASE ALL .............DELETE ENTIRE INDIRECT PROGRAM *FOR X=E1[,E2],E3; COMMAND REPEATED (E3-E1)/E2+1 TIMES *GO [L1] ...........START PROGRAM EXECUTION AT LINE L1 *IF (E1)L1[,L2,L3] ...............BRANCH ON SIGN OF E1 *MODIFY <L1> .............................EDIT LINE L1 *QUIT ..................................STOP EXECUTION *RETURN ..........TERMINATE 'DO' OR 'GOSUB' SUBROUTINE *SET X=<E1> ...............ASSIGN VALUE E1 TO VARIABLE *TYPE [NUMBERS, E1, "TEXT", !, #, :, $ OR %] ...OUTPUT *WRITE [LINE OR GROUP NUMBER] ............LIST PROGRAM LIBRARY AND FILE COMMANDS *LIBRARY CALL [DEVICE:]<PROGRAM> .........LOAD PROGRAM *LIBRARY DELETE [DEVICE:]<PROGRAM> .....UNSAVE PROGRAM *LIBRARY GOSUB [DEVICE:]<PROGRAM> [G1] SUBROUTINE CALL *LIBRARY LIST [DEVICE:][FIRST LISTED FILE] ....CATALOG *LIBRARY RUN [DEVICE:]<PROGRAM> [L1] ............CHAIN *LIBRARY SAVE [DEVICE:]<PROGRAM> .........SAVE PROGRAM *LIBRARY EXIT ..................RETURN TO PS/8 MONITOR *OPEN INPUT [DEVICE:][FILE][,ECHO] ....PREPARE TO READ *OPEN OUTPUT [DEVICE:][FILE][,ECHO] ..PREPARE TO WRITE *OPEN RESTORE INPUT[,ECHO] .....RESUME INPUT FROM FILE *OPEN RESTORE OUTPUT[,ECHO] .....RESUME OUTPUT TO FILE *OUTPUT CLOSE ......OUTPUTS BUFFER; CLOSES OUTPUT FILE ---INPUT---,ECHO ........ECHO INPUT ONTO OUTPUT DEVICE ---OUTPUT---,ECHO ...........ECHO OUTPUT ONTO TERMINAL .FC & .FD ARE THE PROGRAM & DATA FILE NAME EXTENSIONS. - - - - - <> ENCLOSE REQUIRED TERMS. [] ENCLOSE OPTIONAL TERMS. ONE LETTER ABBREVIATIONS MAY BE USED AS COMMAND WORDS. X REPRESENTS A VARIABLE. E1, E2 AND E3 ARE ARITHMETIC EXPRESSIONS. L1, L2 AND L3 ARE LINE NUMBERS. G1 IS A LINE OR GROUP NUMBER. L1-L3 AND G1 CAN BE REPLACED BY ARITHMETIC EXPRESSIONS WHICH DO NOT BEGIN WITH AN 'A'.



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