Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0028/snobol.opr
There are 2 other files named snobol.opr in the archive. Click here to see a list.
- SNOBOL.OPR -
THESE NOTES PROVIDE THE INFORMATION NECESSARY FOR THE
MAINTENANCE AND GENERATION OF THE SNOBOL PROGRAMMING
SYSTEM ON A PDP-10 SYSTEM.
-TABLE OF CONTENTS-
A. DESCRIPTION OF THE COMPONENT FILES
B. COMPILING INSTRUCTIONS FOR EACH PROGRAM
C. LOADING INSTRUCTIONS FOR THE SYSTEM
D. PATCHING TECHNIQUES WITH DDT
E. BRIEF HISTORY
F. ACKNOWLEDGEMENTS
A. DESCRIPTION OF THE COMPONENT FILES
GENERAL-
MOST OF THE FILES DESCRIBED HERE HAVE ALPHANUMERIC FILE NAMES
AND NUMERIC EXTENSIONS. THE EXTENSION NUMBER IS INCREMENTED
BY ONE EACH TIME AN EDIT HAS BEEN MADE. THE FOLLOWING COMMENTS
WILL REFER ONLY TO THE FILENAMES, LEAVING THE READER TO DETER-
MINE THE LATEST EXTENSION.
1. "C"-COMMON SUBROUTINES
THIS IS A COLLECTION OF SUBROUTINES WHICH ARE CALLED
PRIMIRARILY FROM MACROS INSIDE THE MAIN SNOBOL PROGRAM.
THE ROUTINES ARE GROUPED HERE FOR CONVENIENCE DURING
REASSEMBLY PERIODS SINCE IT IS MUCH QUICKER TO RE-
ASSEMBLE "C" RATHER THAN "SNOBOL". EXAMPLES ARE
THE 'DATE' ROUTINE, THE ROUTINE WHICH DOES ALL CHAR-
ACTER STRING OUTPUTTING, AND THE ROUTINE WHICH CONVERTS
A FLOATING POINT NUMBER INTO A STRING.
2. "EXECL"-EXECUTIVE, LOW PART
THIS IS AN ARTIFACT OF THE FORTRAN EXECUTIVE SYSTEM.
IT CONTAINS ALMOST EXCLUSIVELY ALL DATA DEFINITIONS
AND WAS MEANT TO BE THE CLASSICAL 'LOW SEGMENT'
IN THE EARLY WAY OF GENERATING TWO SEGMENT PROGRAMS.
MANY OF THE DEFINITIONS WERE TAKEN FROM 'FX4'.
3. "EXEC"-EXECUTIVE ROUTINE
THIS IS THE PROGRAM WHICH COMMUNICATES WITH THE USER
AT START-UP TIME. IT ACCEPTS A STANDARD COMMAND STRING
OF THE FORM
LIST-DEVICE:FILE_SOURCE-DEVICE:FILE(S)
THE ROUTINE WAS LARGELY STOLEN FROM THE FORTRAN EXEC
SINCE IT HAD ALL THE FEATURES NEEDED BY SNOBOL, I.E.
TMPCOR UUO INTERFACE, CCL INTERFACE AND THE ABILITY
TO PROCESS SWITCHES.
4. "MACROS"-MACRO DEFINITION DEFINITIONS FOR SNOBOL
THESE ARE THE 130 ODD MACRO DEFINITIONS NEEDED
BY SNOBOL. THEY WERE CODED FROM THE DESCRIPTION
PROVIDED BY BELL TELEPHONE LABORATORIES ENTITLED
'A GUIDE TO THE MACRO IMPLEMENTATION OF SNOBOL4'
BY RALPH GRISWOLD.
5. "SYNTAX"-SYNTAX TABLES FOR SNOBOL
THESE ARE THE APPROXIMATELY 25 TABLES WHICH DEFINE
THE CHARACTER PROCESSING OF THE SNOBOL SYNTAX.
THESE TABLES ARE USED BY THE 'STREAM'
MACRO (WHICH CALLS THE 'STREEM' SUBROUTINE IN 'C').
THE TABLES ARE LAID OUT IN SUCH A WAY THAT EACH
CHARACTER TAKES UP ONE HALFWORD. CONSEQUENTLY
EACH TABLE IS 128/2 WORDS LONG.
6. "SNOBOL"-THE MAIN PROGRAM
THIS IS THE 'MAIN PROGRAM' WHICH CONSISTS
MAINLY OF THE MACROS CALLS, ALTHOUGH THERE IS A
CONSIDERABLE AMOUNT OF ASSEMBLY LANGUAGE CODE TO
HANDLE THE UNIQUE PDP-10 FEATURES.
7. "P"-PARAMETER DEFINITIONS
THIS IS A SMALL FILE WHICH CONTAINS COMMON DEFINITIONS
SUCH AS ACCUMULATOR ASSIGNMENTS.
8. "IFILE"-A MODIFIED 'IFILE' ROUTINE
THIS IS A MODIFED 'IFILE' ROUTINE WHICH ACCEPTS SIX
CHARACTER FILE NAMES, THREE CHARACTER EXTENSIONS,
AND PROJECT-PROGRAMMER NUMBERS. IT IS USED BY THE
'EXEC' ROUTINE AS WELL AS FOR THE 'IFILE/OFILE'
PRIMITIVE FUNCTIONS.
9. "FORSE"-FORTRAN OPERATING SYSTEM
THIS IS A MODIFIED VERSION OF THE STANDARD FORTRAN
OPERATING SYSTEM. THE CHANGES ARE PRIMARILY ENHANCE-
MENTS TO HANDLE THE FULL CHARACTER SET AND TO FIX
SOME OF THE RESULTING OBSCURE BUGS.
10. "LIBSNO"-LIBRARY ROUTINES FOR SNOBOL
THIS IS 'FUDGED' VERSION OF LIB40.REL WHICH CONTAINS
THE BINARY VERSIONS OF THE AFFECTED LIBRARY PROGRAMS
SUCH AS IFILE, FORSE, TRAPS AND ALPHO.
11. "TRAPS"-TRAP HANDLER
THIS IS A VERY SLIGHTLY MODIFIED VERSION OF THE STANDARD
FORTRAN 'TRAPS' ROUTINE. AT 'OVTRAP' A CHANGE WAS
MADE TO RE-CALL 'APRENB' UUO ON EVERY OCCURRENCE
IN ORDER TO MAKE SNOBOL RUN SUCCESSFULLY
ON PRE-4S72 MONITORS WHICH DO NOT KNOW ABOUT THE
400000 BIT IN THE APRENB UUO.
12. "DDT"-DYNAMIC DEBUGGING TECHNIQUE
THIS JUST HAPPENS TO BE A RECENT VERSION OF DDT.
IT IS INCLUDED HERE TO MAKE SURE A COPY IS AVAIL-
ABLE WHICH IS ABLE TO HANDLE PATCHES INTO THE HIGH
SEGMENT.
13. "ALPHO"-ALPHANUMERIC OUTPUT ROUTINE
THIS CONTAINS ONE EDIT TO NOT CONVERT CONTROL
CHARACTERS TO BLANKS AS IS DONE IN FORTRAN. OTHER-
WISE IT IS THE STANDARD 'ALPHO' FORTRAN ROUTINE.
14. "MAC441"-MACRO VERSION 44 WITH ONE EDIT
MACRO.44 (OR LATER) IS REQUIRED TO ASSEMBLE THE
INDIVIDUAL PROGRAMS SINCE THE 'TWOSEG' PSUEDO-OP
IS REQUIRED TO GENERATE A REENTRANT SYSTEM.
15. "LOAD52"-LOADER VERSION 52
THIS VERSION OF THE LOADER IS REQUIRED TO LOAD
THE CODE PRODUCED BY MAC441.
16. "*.SNO"-SNOBOL SOURCE PROGRAMS
THESE ARE A RANDOM COLLECTION OF SOURCE PROGRAMS
I DEVELOPED WHILE MAKING SNOBOL. NOT ALL OF THEM
WORK. THE ONES WHICH DO INCLUDE 'FACTOR', 'APIAPT',
'BRIDGE', 'TESTER', 'SORT', 'COMMON' AND 'SYNTAX'.
THE REMAINDER ARE IN VARIOUS STATES OF COMPLETION.
17. "DEVTB"-DEVICE TABLE
THIS FORTRAN 'DEVTB' WAS MODIFIED PRIMARILY TO
MAKE DEVICE NUMBERS 5, 6, AND 7 CONSISTENT WITH
STANDARD SNOBOL. WHILE I WAS AT IT, I ALSO MADE
SOME OTHER ADDITIONS AND REARRANGEMENTS.
18. "EBCDIC"-EBCDIC TO ASCII CONVERSION
THIS IS A MODIFIED 'CODE' PROGRAM USED TO CONVERT
A 7 TRACK BCD TAPE GENERATED ON A 360.
19. "RUNOFF"-DOCUMENTATION PRODUCTION PROGRAM
THIS IS A BINARY COPY OF A DECUS PROGRAM USED
TO PRODUCE THE SNOBOL USER'S GUIDE. IT ACCEPTS
AN ASCII FILE WITH IMBEDDED CONTROL CHARACTERS
AND FORMATS THE OUTPUT. IT ACCEPTS A DEFAULT
INPUT FILE EXTENSION OF 'RNO'.
20. "SNOBOL.RNO"-SNOBOL USER'S GUIDE
THIS ASCII FILE IS IN RUNOFF FORMAT. TO
PRODUCE THE SNOBOL USER'S GUIDE RUNOFF MUST
PROCESS THIS FILE.
21. "SNONNN.MAP"-LOADER MAP
THIS IS THE LOADER MAP WITH LOCAL SYMBOLS
WHICH DESCRIBES THE DISTRIBUTED BINARY FILES.
B. COMPILING INSTRUCTIONS
EXCEPT AS NOTED BELOW ALL PROGRAMS ARE ASSEMBLED
THE NORMAL WAY.
1. "C"-COMMON ROUTINES
.RUN DSK MAC441
*CNNN,CNNN/C_P.NNN,C.NNN ;(NNN=VERSION NUMBER)
*
2. "EXECL"-EXECUTIVE, LOW PART
.RUN DSK MAC441
*EXECL,EXECL/C_P.NNN,EXECL.NNN
*
3. "EXEC"-EXECUTIVE
.RUN DSK MAC441
*EXEC,EXEC/C_EXEC.NNN
*
4. "SNOBOL"-MAIN PROGRAM
.RUN DSK MAC441
*/P/PSNONNN,SNONNN/C_MACROS.NNN,P.NNN,SYNTAX.NNN,SNONNN.MAC
*
THE 'P' SWITCHES ARE REQUIRED TO PREVENT A MACRO PDL OVERFLOW
C. LOADING INSTRUCTIONS
THE PROGRAM "LOAD52" MUST BE USED IN ORDER TO LOAD THE OUTPUT
PRODUCED BY MACRO.44. THE FOLLOWING FORMAT SHOULD BE CLOSELY
FOLLOWED IN ORDER TO MAKE 'DDT' THE LAST PROGRAM LOADED IN ORDER
TO RECOVER THE SPACE LATER.
IT IS IMPORTANT THAT 'EXECL' BE LOADED FIRST BECAUSE THE
IMPLEMENTATION OF THE 'SAVE' PRIMITIVE FUNCTION ADDED FOR THE
PDP-10 DEPENDS UPON IT.
.RUN DSK LOAD52
*/S
*EXECL,EXEC,CNNN,SNONNN
*LIBSNO/L
*/F
*DDT
*/B
*DSK:SNONNN_/M
*$
THIS SHOULD BE FOLLOWED BY THE 'SAVE' COMMAND OF THE FORM
.SAV DSK SNONNN
.JOB SAVED
.THIS WILL MAKE THE PROGRAM REENTRANT BUT WILL LEAVE YOU WITH
A NON-SHARABLE HIGH SEGMENT. THIS WILL MAKE IT EASIER TO MAKE
ANY PATCHES TO THE HIGH SEGMENT IF IT BECOMES NECESSARY LATER.
THE INTENT IS TO NOW SET UP 'JOBSA' SO THE SPACE USED BY THE
SYMBOL TABLE AND DDT IS RECOVERED WHEN THE PROGRAM IS
STARTED. THE RIGHT HALF OF 'JOBDDT' POINTS TO THE START ADDRESS
OF DDT. THIS VALUE WILL BE PLACED IN THE LEFT HALF OF 'JOBSA',
WHICH WILL BE COPIED TO JOBFF AUTOMATICALLY BY THE SYSTEM WHEN
THE PROGRAM IS STARTED. SO DO THE FOLLOWING
.GET DSK SNONNN
.JOB SETUP
^C
.DDT
XXX
$S$$R (TO SET THE TYPEOUT MODE TO WHAT WE WANT)
JOBDDT[ TO GET THE LH AND RH OF JOBDDT
JOBSA[ TO SEE WHAT IS IN JOBSA
AT THIS POINT COPY THE RH OF JOBDDT INTO THE LH OF JOBSA
FIND OUT HOW MANY '1K' BLOCKS ARE TAKEN BY THE RESULTING
LOW SEGMENT. ASSUME THE VALUE OF THE RH OF JOBDDT IS 25567
THEN THE RESULTING SIZE IN 'K' CAN BE FOUND WITH DDT BY
25567$10R= 11116. THIS MEANS IT IS A LITTLE OVER 11K
WE NOW WANT TO SHRINK THE LOW SEGMENT TO 12K (THE NEXT HIGHEST
1K BOUNDARY) WITH THE CORE COMMAND. THE CORE COMMAND VARIES
DEPENDING WHETHER YOU ARE RUNNING WITH 4S50 OR LATER.
WITH 4S50 THE ARGUMENT TO THE 'CORE' COMMAND IS INTERPRETED
TO MEAN ONLY THE SIZE OF THE LOW SEGMENT, SO TO MAKE THE
CORE IMAGE 12K TYPE ^C TO GET BACK TO THE MONITOR
AND TYPE 'CORE 12'.
WITH 4S72 AND LATER THE ARGUMENT TO THE 'CORE' COMMAND IS
INTERPRETED TO MEAN THE SUM OF THE LOW AND HIGH SEGMENTS.
SO TYPE ^C TO GET BACK TO THE MONITOR AND TYPE'CORE'
WITH NO ARGUMENTS TO FIND OUT HOW BIG THE HIGH SEGMENT IS
(THIS WILL BE THE SECOND NUMBER TYPED OUT). ADD TO THIS NUMBER
THE DESIRED LOW SEGMENT SIZE AND TYPE THAT, SUCH AS
'CORE 28'
ALL THAT IS NOW REQUIRED IS TO SAVE THE VERSION AS A SHARABLE
REENTRANT PROGRAM, SUCH AS
.SSAVE DSK SNOBOL
ONE FINAL TASK REMAINS, AND THAT IS TO GENERATE A FILE KNOWN
AS 'SNOBOL.INI'. THIS IS DONE BY STARTING AN UNRUN VERSION OF
SNOBOL AND USING THE 'C' SWITCH, SUCH AS
.RUN DSK SNOBOL
*/C
*^C
.
NOW TRANSFER SNOBOL.LOW, SNOBOL.SHR, AND SNOBOL.INI TO
SYS: AND THE VERSION IS READY FOR USE BY OTHERS. TO USE
THIS VERSION ON YOUR OWN PRIVATE DISK AREA, ASSIGN YOUR DSK
AREA, ASSIGN YOUR DSK TO SYS, SUCH AS
.ASSIGN DSK SYS
.DSK ASSIGNED
AND YOU ARE ALL SET
D. FINAL CORRECTIONS
TO MAKE ANY PATCHES VIA DDT, USE THE NON-SHARABLE COPY,
MAKE THE PATCHES AND PRODUCE THE 'SNOBOL.*' FILES AS
DESCRIBED ABOVE.
E. HISTORY
SNOBOL ON THE PDP-10 WAS STARTED IN LATE MAY 1969. IN AUGUST
A VERSION WAS RUNNING WHICH WOULD EXECUTE TRIVIAL PROGRAMS. BY
JANUARY 1970 VERSION 2.0 WAS COMPLETED AND SUBMITTED
TO DECUS. WORK STARTED ON MAKING THE SYSTEM REENTRANT IN LATE
JANUARY WITH THE RELEASE OF VERSION 3.0 BY BELL LABS. IT TOOK
ABOUT 2 WEEKS (ON THE ORDER OF 20 HOURS WORK) TO MAKE THE CHANGES
AND GET THE NON-REENTRANT VERSION OF 3.0 RUNNING. WITH THIS
DONE, WORK PROGRESSED TO MAKE IT REENTRANT. THIS WAS PLANNED
ALL ALONG SO THERE WASN'T MUCH TO DO. THE BIGGEST PROBLEM
WAS SPENDING AN ENORMOUS AMOUNT OF TIME FIGURING OUT HOW TO
GENERATE THE GLOBAL LINKAGES REQUIRED OF THE 'HISEG' PSUEDO-OP
DAYS. FINALLY IN MAY DAVE NIXON PRODUCED MACRO.44 AND LOADER.52
AND THE 'TWOSEG' FACILITY CAME INTO BEING. THIS MADE THE TASK
OF GETTING SNOBOL RENTRANT TRIVIIAL. FINALLY VERSION 3.3
CORRECTIONS CAME OUT AND THE PACKAGE WAS ESSENTIALLY DONE
IN LATE MARCH. EARLY VERSIONS WENT TO CARNEGIE-MELLON,
WESTERN ELECTRIC, NIH,UC IRVINE AND BLAINE BELECKI. BUGS
WERE FOUND AND CORRECTED IN LATE JUNE. THE PACKAGE
WAS COMPLETED IN OCTOBER 1970.
F. ACKNOWLEDGEMENTS
1. WITHOUT RALPH GRISWOLD AT BELL LABS SNOBOL WOULD NEVER HAVE
GOTTEN OUT OF N.J. HIS WORK TO GENERATE THE DOCUMENTATION
CAN NEVER BE UNDERESTIMATED. THANKS FOR THE MANY LETTERS AND
STRANGE PHONE CALLS.
2. WITHOUT BILL WEIHER, FIRST AT COMPUTER CENTER AND THEN
AT TYMSHARE, I COULD NEVER HAVE GOTTEN MANY OF
THE BUGS IN MACRO AND LOADER FOUND. I SERIOUSLY
DOUBT WHETHER I WOULD HAVE FINISHED WITHOUT HIS HELP.
3. WORK WAS DONE ON MANY MACHINES, NAMELY ISI(PORTLAND),
COMPUTER CENTER CORP(SEATTLE), U. OF UTAH(SALT LAKE CITY),
STANDFORD AI(PALO ALTO), UC IRVINE(IRVINE) AND SRI(MENLO PARK).
I AM SURE I WOULD NEVER HAVE FINISHED HAD IT NOT BEEN
FOR SRI WITH THEIR 200K OF CORE AND LIMITLESS
MACHINE ACCESS. THE BULK OF THE REMAINDER WAS DONE AT COMPUTER
CENTER BUT THE CHIEF ADVANCES THERE WERE TO PRODUCE MORE
CASES OF PINK SCHEDULING THAN I CARE TO ADMIT.