• Aucun résultat trouvé

PREA SRNK

Dans le document Technical Information (Page 156-163)

50S PROGRAM LIBRARY PROGRAM DESCRIPTION

PREA SRNK

SUBROUTINES USED:

900 Series Only

Routine associated with symbolic input (CRDHt, RDPTt, and RM TBtt)

WMTBtt REWWtt EFMTtt

Catalog No. 042016

900 Series Only

SCIENTIFIC DATA SYSTEMS

SOS PROGRAM LIBRARY PROGRAM DESCRIPTION

Catalog No. 042016 IDENTIFICATION: Process standard procedure file (PREA or PREASM)

PURPOSE: To define directives, process standard procedures, and reformat dictionary entries and to establish the byte table in preparation for assembling programs.

ACTION: PREASM acts as the link between ENCODER and the assembler programs.

ENCODER builds a series of tables during the encoding process in order to translate the symbolic data into compressed encoded information. These tables are inadequate for the assembly program for several reasons.

1. The tables are too extravagant of space. ENCODER needs a 3-word table to find and define unique dictionary entries efficiently; once the dictionary is defined, however, a 1-word pointer to each entry wi II suffi ce very we II to interpret the encoded text.

2. The dictionary is in the wrong format. The assembly programs will need to make relatively few references to the actual dictionary entries for a byte if they can know the type of information the byte represents.

3. The data is incomplete. ENCODER processes only the user program; In order to complete the assembly operation the assembly routines must also have at their disposal definitions of the directives and standard procedures referenced by the user's program.

PREASM first reads the dictionary from the standard procedures file on the systems tape and then, using the tables and communication cells left by ENCODER, defines all unique bytes in much the same manner as does ENCODER. For each entry in the standard procedure di ctionary PREASM makes a 1-word entry in an equivalence table, ETAB, which allows the

translation of byte numbers from the standard procedures text to the equivalent

ACTION:

(cont. )

PROGRAMMING TECHNIQUES:

900 Series Only

Catalog No. 042016 byte numbers in the userls program. In a similar manner PREASM defines the directive bytes from dummy dictionary entries assembled as part of PREASM.

This done, PREASM has no further need for the balanced tree search table CPO. The next step is to convert the dictionary into two tables, part being the dictionary characters themselves in packed format and the remainder a

1-word pointer to the character position of the lead dictionary character for the byte. The pointer word also contains the number of characters in the di ctionary and the code i ndi cati ng type of entry.

The dictionary characters are stored in ascending order starting at the loca-tion given in DTAB whose address is sufficiently large to allow the largest segment of the assembly system to be loaded below it. The byte table (BT AB) is stored in descending locations starting just above QBOOT at the upper end of memory.

Once the dictionary has been compressed and the byte table has been estab-lished, PREASM defines the directives by entering them in the symbol table just below BT AB; these are a Iso stored in descendi ng order.

The text of the standard procedures fi I e are now read, and those procedures to which reference has been made in the useris program are stored in the sample storage area just above the dictionary. Those NAMEs wh i ch have been referred to in the user's program are defined by entering NAME items in the symbol table.

When a II records from the standard procedures fi I e have been processed, PREASM calls the tape loader routine to load SHRINK.

PREASM is a relocatable program originated at location 13500 This leaves

u

PROGRAMMING established by MONARCH.

Since the length of ENCODER and S4B combined is larger than PREASM, the

As noted above, there are a few words of communicat;on between ENCODER and PREASM. These cells are addressed by absolute addresses within PREASM.

Processing of Standard Procedure Sample

The encoding technique used in the META-SYMBOL assembly system allows

PROGRAMMING TECHNIQUES:

(cont. )

900 Series Only

Catalog No.

.

042016

degenerate to nothing. This single underlying phenomenon will be apparent through the following discourse on sample processing.

NAMEs of procedures are not defined when they appear inside a nested pro-cedure but rather the NAME I ines are moved to the propro-cedure sample and the NAMEs defined when the outer procedure is referenced.

Each new line of procedure sample is processed starting at the location LINE.

The line is read by calling TEX and then scanning from left to right. The label is saved at LBL. The operation code is obtained and tested to see if it is a directive. If the line is not a directive, control goes to LIN3. If it is a directive, control goes to PRO for a PROC, FUN for a function, NAM for a NAME, or SEND for an END. All other directives go to LIN3. A direc-tive branch table is used to determine the type of direcdirec-tive. Processing stops when an end-of-fi Ie is detected.

At LIN3 the line is moved to the sample storage area if the previous line was moved there. If the I ine is not inside a procedure, or if it is inside a proce-dure but no NAMEs have been defined for the proceproce-dure, the line is ignored.

If the I ine is the first I ine following a procedure NAME I ine, and at least one NAME of the procedure has been referred to by the user's program, the starting location for the procedure is determined and placed in the NAME items saved for this PROC. The procedure line is moved to sample storage followed by the current line, and a flag is set indicating the sample is being saved.

Processing the PROC and FUNC lines. The detection of PROC or FUNC lines results in a count being incremented to indicate the level of procedure nesting. If the PROC or FUNC is not nested, the I ine is moved to a buffer, PRBYTS, for later insertion into the sample storage area, and a flag is set to

PROGRAMMING TECHNIQUES:

(cont. )

900 Series Only

Catalog No. 042016 Processing the NAME line. When a NAME is detected, a test is made to determine if a PROC or FUNC line has been encountered; if one has not, the line is ignored. If the NAME appears in nested sample, it is treated like any other line by transferring control to LIN3A. If the NAME appears in the user's sample, the count of NAMEs saved is incremented and a

NAME item inserted in the symbol table. If it does not appear in the user's program, the line is ignored. When inserting NAME items into the symbol table, the NAMEs associated with a procedure are linked so that once the procedure origin has been established it may readily be inserted in all the NAME items. The value associated with the NAME is obtained by call ing VAL.

Processing the END lines. When an END directive is detected, the pro-gram determines whether the END follows a PROC or FUNC. If not, it is ignored; if it does, the nested procedure count is decremented. If this is the END of an outer PROC, the sample processing flag is turned off and a test is made to see if any NAMEs have been defined. If the sample is being saved, control goes to LIN3A; if not, the line is ignored. If an END is detected within nested PROC, sample control goes to LIN3 after decrement-i ng the nested procedure count.

The following modifications have been incorporated within the RAD MONARCH version of META-SYMBOL:

1. The input buffer has been moved to correspond with the locations used in the Basic RAD Loader routine.

2. Calculation of top of memory and UAT entries is changed slightly because of the larger resident monitor.

3. The initialization of the RDTP routine is bypassed since the system is RAD-resident.

CALLING

ttThis routine is described under MSCONTRL.

ttt No flow diagram provided.

Dans le document Technical Information (Page 156-163)