• Aucun résultat trouvé

SDS PROGRAM LIBRARY PROGRAM DESCRIPTION,

Dans le document Technical Information (Page 78-83)

Catalog No. 612001

PURPOSE: To encode symbol ic programs or to update existing encoded programs.

ACTION: Performs the following functions:

1. Copies symbol ic corrections to scratch tape X2, if necessary.

2. Reads a record of symbol ic input and checks for correction (+ in col umn 1 ). If the card is a correction, or if there is encoded input on I y as de-termined by an end-of-file return from the reader, ENCODER copies the old encoded dictionary into core and builds the APO table of dictionary addresses.

3. ENCODER reads the symbolic input or the encoded text, or both if it be an update run. When correcting an encoded fi Ie, the symbol ic inser-tions are inserted into the fi Ie by using the same TRANS routine as is used for runs with only symbolic input. Deleted encoded lines are by-passed by calling the DE LETE routine, and encoded I ines to be retained are passed along by calling the SKIP routine. All symbolic lines are translated to META-SYMBOL language by calling the translation pro-gram S4B.

4. As each I ine of input is obtained, ENCODER scans the I ine and collects each string of characters into adictionaryentry. (See Section 4, Item Formats.) The encoder builds four types of entries: blank strings, spe-cial characters, numeric items, and alphanumeric items. If the string is in the form of a byte of encoded record, this construction step is elim-inated since the dictionary entry is already available. If this is an en-coded byte, the program tests APO to see if the new byte val ue has been

ACTION:

(cant. )

9300 Only

Catalog No. 612001

determined; if it has not, or if this is a string from a symbolic record, SRCH is called to find the location of the CPO (balanced tree insert table) entry for the string and to obtain the byte value. If SRCH fails to find an equivalent entry in CPO, NSRT is called to enter the string intothedictionary (BPO) and insert a 3-word entry into CPO for later reference. (See Section 4, I tern Formats.) The sequence number of a unique string of characters or d icti,onary entry is the byte va lue for the entry.

5. As a value for each byte is obtained, it is output on the intermediate output tape (X 1). Th is encoding-updating process continues unti I an end of fi Ie is detected on the input fi Ie. Note that an END card does not terminate the encoding process. During the encoding process com-ments are not encoded in the manner indicated. Comcom-ments, as deter-mined by the presence of an * in the first character of the record or by three blank fields (excluding imbedded blank strings in TEXT and BCD variable fields or in alphanumeric expressions), are output as they ap-pear in the source language except that they are preceded by a count byte of six bits indicating the number of comment characters.

6. vVhen an end-of-file conditions is detected on the input file, control goes to the END section of ENCODER. Here a check is made to see if there was encoded input; if so, the insert table CPO is moved to the origin of APO and the dictionary is moved to a position immediately following CPO. The intermediate output tape is rewound, and the dic-tionary is output on the encoded output device by selecting the diction-ary entry for each entry in CPO. In this manner dropped bytes caused by deleting encoded I ines are purged. As each dictionary entry is out-put, it is moved to high memory to form a dictionary for PREASM. When

ACTION:

(cont. )

CALLING SEQUENCE:

PROGRAMMING CONVENTIONS:

9300 Only

Catalog No. 612001

7. When the output file has been completed, ENCODER checks the I/O function control cells in MSCONTRL to determine if additional outputs are required. If encoded output is the only output, control is returned to MONARCH; otherwise, the PREASM routine is loaded by branching to the basic tape loader routine.

ENCODER is one of several independently assembled routines loaded as the first assembler overlay. The last of these routines in order loaded is MSCONTRL. The transfer address for MSCONTRL is to a cell containing a branch to the starting location of ENCODER (TRACOR).

Since ENCODER leaves the dictionary and search tables in core for PREASM, it is necessary to provide a few control words to PREASM indicating the lo-cation of tables and key words. The following control cells are left by ENCODER in the first locations following MSCONTRL.

1. DTAB. Starting location for PREASM-built dictionary.

2. APO or CPO. The next available location in the balanced tree search table for entering items.

3. BPO. The next available cell in the ENCODER-bui It dictionary.

4. HED. A 3-word control region used in building CPO and BPO. All chain ends in CPO point to HED.

5. CORG. The location minus 9 of the first word of CPO table.

6. CSEQ. The next sequence number or byte value to be defined.

ENCODER has a 2-condition rewind of magnetic tape X2. If corrections are used and copied to X2, ENCODER rewinds X2 in preparation of taking outputs on X2. If running with MAGPAK tapes, X2 is rewound.

MEMORY

REQUIREMENTS:

SUBROUTINES USED:

9300 Only

Variable

PTCH INC TBOUT

DEC OUTC S4B

DE LETE SRCH OPENt

SKIP NSRT READt

INIT TRAIL INPUT t

TRANS IN WRITEt

STORE OUT OUTPUrt CHAR MVTAB CLOSEt RCRD RESET

tThese routines are described under MSCONTRL.

Catalog No. 612001

ENTRY POINTS TO ENCODER SUBROUTINES

Page Page

Entry Description Flowchart Entry Description Flowchart

ALL 3-49 3-81 INAB4 3-75

* *1 • -1*;

SCIENTIFIC DATA SYSTEMS

Dans le document Technical Information (Page 78-83)