The Implementation Of A Special Language Interpreter

(A Thesis Presented to The Faculty of the Department of Applied Science The College of William and Mary in Virginia - August 1975)
by James Thomas Lee, Jr. 07/05/97

Section III. THE DATA DUMP {1,952 words}

Perhaps one of the single most important features of any computer system is the data dump. When the user's program has gone astray, confusing both the user and the computer, then the computer can immediately alert the user of a problem and give him an indication of the error with a dump. The data dump shows its value by providing valuable information to the user about the contents of his files which will assist him in correcting the problems. The dump designed for the Interpreter carefully prints all data files in an easy to read format; however, since the computer works in binary, the files are binary. For the dump, though, some files are dumped in binary octal, and some in BCD (see Figure 7).

In most every instance when problems occur, the user will need to see a listing of his program. Thus, the first part of the dump is the program listing. Just above the listing, there will be an address request which will indicate the location in the Interpreter from where the dump was requested. This information is provided for the user with a listing of the Interpreter. It may also be used by the person who maintains the Interpreter in the event of a system programming error. To the left of the program listing, there is a seven-digit number which is a character address (decimal, relative to PERM) of the instruction. The address refers to the first character of the instruction. Later the reader will see that the first character address shown with the instruction corresponds to the PERM location of the statement and not to the printed character location of the statement. Recall that the program is not stored exactly as it is read (see Section IIA, para 1). The purpose here is that the Interpreter uses the character address as a guide to each statement; so the address is for the use and benefit of the Interpreter and not the user.

---------------------------------------------------------------------------------------------------------------------------

Figure 7. Illustrated above is a sample data dump. The problem here was earlier selected to demonstrate the development of the first pass tables (see Figure 4).

---------------------------------------------------------------------------------------------------------------------------

SAMPLE DATA DUMP

ADDRESS	REQUEST	00052520
ADDRESS	PROGRAM LISTING			REGISTERS   COUNTERS
0000000		INTEGER A,B(7),C	A  00000001  PROG	00135
0000012		REAL D,E(2,2)		Q  00006325  COUNT	00001
0000024		STRING F,G,H		B1 00000241  STMTPTR	00008
0000033		STRING (5) I		B2 00000146  POINTER	00036
00000042	BOOLEAN J,K		B3 00000000  DATAPTR	00135
0000049		STRING (13) L(3,3,3)
0000064		DATA A,7,E(1,2),3.5,F,"CAT",I,"LIVER",J,"T",L(1,2,1),"ABCDEFGHIJKLM"
0000131		TERMINATE

IDENTIFIERS
NAME	TYPE	ADDRESS	ARRAY-PROG POINTER	ABSOLUTE ADDRESS
A000	IN00	0000000			0000000			00062325
B000	IN00	0000001			0000007			00062326
C000	IN00	0000008			0000000			00062335
D000	RE00	0000009			0000000			00062336
E000	RE00	0000011			0000019			00062340
F000	ST00	0000019			0000000			00062350
G000	ST00	0000020			0000000			00062351
H000	ST00	0000021			0000000			00062352
I000	ST00	0000022			0000000			00062353
J000	B000	0000024			0000000			00062355
K000	B000	0000025			0000000			00062356
L000	ST00	0000026			0000057			00062357

OTHER CORE--PERM ADDRESS	00060053
60050	0000	0000	0000	'INA	,B(7	),C;	'RED	;E(2
60060	,2);	'STG	,G,H	;'ST	(5)I	;'BO	J,K;	'ST(
60070	13)L	(3,3	,3);	'DAA	,7,E	(1,2	(,3.	5,F,
60100	"CAT	,"I,	"LIV	ER,"	J,"T	,"L(	1,2,	1),"
60110	ABCD	EFGH	IJKL	M";'	TE;0	0000	0000	0000

OTHER CORE--TABLES ADDRESS	00062161
62160	0000	A000	00IN	0000	B000	07IN	0001	C000
62170	00IN	0008	D000	00RE	0009	E000	0CRE	000=
62200	F000	00ST	000C	G000	00ST	000D	H000	00ST
62210	000E	I000	00ST	000F	J000	00B0	000H	K000
62220	00B0	000I	L000	0ZST	000J	0000	0000	0000

OTHER CORE--STMTTAB	ADDRESS	00061505
61500	0000*	0000	0000	0000	0000	0000	0000	0000
	0000	0000	0000	0000	0000	0014	0030	0041
61510	0000	0000	0000	0000	0000	0000	0000	0000
	0052	0061	0100	0203	0207	0000	0000	0000

*The values in this table are printed in octal which means that each value is the eight digit
combination of the number above and below on the line.

OTHER CORE--STLGTAB ADDRESS 00064045
64040	0000	0000	0000	0000	0000	F000	0004	G000
64050	0004	H000	0004	I000	0005	L000	000"	0000

OTHER CORE--DATATAB ADDRESS 00062325
62320	0000*	0000	0000	0000	0000	0000	0000	0000
	0000	0000	0000	0000	0000	0007	0000	0000
62330	0000	0000	0000	0000	0000	0000	0000	0000
	0000	0000	0000	0000	0000	0000	0000	0000
62340	0000	0000	2002	0000	0000	0000	0000	0000
	0000	0000	7000	0000	0000	0000	0000	0000
62350	2321	0000	0000	4331	5100	6300	0000	0000
	6300	0000	0000	6525	0000	0000	0000	0000
62360	0000	0000	0000	0000	0000	0000	0000	0000
	0000	0000	0000	0000	0000	0000	0000	0000
62370	0000	0000	0000	2122	2526	3132	4400	0000
	0000	0000	0000	2324	2730	4243	0000	0000

*The values printed in DATATAB, as was the case in STMTTAB., are printed in octal.

---------------------------------------------------------------------------------------------------------------------------

To the right of the program listing is a summary table which lists the values, at the time of print, of significant registers and program counters. The CDC 3100 computer has five registers which are displayed on the computer console. These registers are key to the programming effort because they are used for all computer operations. The dump will print a list of these registers, A, Q, BI, B2, and B3, and their current values. Beside these registers will be a list of the counters to the more important tables of the Interpreter. These counters keep a check on PERM which houses the user's input program, INST, which contains the last instruction read by the interpreter, STMTTAB, which holds the character addresses of each instruction, TABLES, which is the table for declared variables and statement numbers, and DATATAB, which of course is the data tables for each declared variable. The counters which prevent any of these tables from being overloaded are PROG, COUNT, STMTPTR, POINTER, and DATAPTR, respectively. Periodically, throughout execution of the Interpreter, checks are made to ensure that these counters, hence the user's program, are not becoming too large. The routine which makes these checks is CNTRCKS (Counter Checks); these checks will be discussed in more detail in Section IV, para 1.

After the program has been listed, the Interpreter prints a table of the statement numbers and declared variables, or as the reader might guess, the information contained in TABLES. The name is listed first; that is, the variable name or statement number; then the data type, the relative location of the variable in DATATAB or the statement number in PERM, whichever is applicable, followed by the array prog pointer, which points to the location in PERM where array dimensioning information for the declared variable can be found, if applicable, and finally, the absolute address of the variable's storage location is printed. Since the data dump will print DATATAB in an octal dump with octal core addresses, the user will need the absolute address in order to locate the value of his variable. All of the information listed in this table can be found in TABLES except the absolute address of the variable, but this information can easily be determined from the information contained in TABLES.

After the TABLES listing, the Interpreter prints the contents of the previously mentioned key tables of the Interpreter. These tables which are dumped are PERM, TABLES, STMTTAB, DATATAB, and STLGTAB, each of which should be of interest to the user. PERM, TABLES, STMTTAB, and DATATAB have already been pointed to above for their importance, but the other one was not mentioned. STLGTAB, as may be recalled (see Section IIA, para 2), is the source of the declared length of the string variables, and is used to assist the Interpreter in proper storage of string variables. Of the five tables dumped, PERM, TABLES, and STLGTAB, all of which contain mostly BCD characters are dumped in BCD rather than octal. The remaining two tables are dumped in octal.

Before each table, a message will be printed to indicate which table is to follow, and the absolute core location of where it begins. Following, of course, is the table dump. The Interpreter is not responsible for the octal core dump. It makes use of the ECDAPS routine, SNAPSHOT (see Section IC, para 4), which handles the output request. When the dump is completed, the Interpreter has finished execution of the user's program, and returns control to the CDC 3100 system.

To be mentioned is the criteria for the data dump. Naturally, the user will not always want to see the full data dump; on the other hand, there will be special times when the user will want it. The Interpreter has tried to second guess the user in this area by providing the capability to get a dump at several strategic evolutions of the execution cycle, but the dump is actually provided by the user's Intervention. The user is given the capability to tell the Interpreter the circumstances in which the dump will be needed and the Interpreter responds to the needs of the user. The user is able to communicate his desires to the Interpreter through the use of jump switches which are a part of the CDC 3100. The turning on of a jump switch will cause the Interpreter to deviate from its normal course, and honor the user's request. The jump switches and their function are as follows:

  • 1. SJ1--Jump switch 1 causes a complete data dump at the normal termination of the user's program. This dump is particularly valuable when the user has a problem getting the correct output, even though the Interpreter has given no diagnostics.
  • 2. SJ2--Jump switch 2 causes the emergency abort of the user's program in the event of an infinite loop. Also, jump switch 2 allows the user to abort the program listing which follows the execution cycle. The latter option should not be put into effect until the listing actually begins to prevent accidentally aborting the program.
  • 3. SJ5--jump switch 5 will cause a dump if the Interpreter finds a diagnostic error. After the dump, though, the Interpreter will terminate the program execution. More about diagnostic errors will be discussed in Section IV.
  • 4. SJ6--Jump switch 6 causes a dump of the program and files after the first pass. This dump will allow the user to check the tables which were developed in the first pass (see Figure 4) and continue with the program execution. This option does not cause the automatic abort of the user's program.
  • The reader will note that the Interpreter makes use of only four of the six jump switches. Jump switch 3 has a special function for the ECDAPS system which would be pertinent when using the ECDAPS routines. Jump switch 4 is being reserved for later technology of the Interpreter if such technology is possible (see Section V for a discussion of the ideas for future consideration for the Interpreter).

    In the discussion above, it was mentioned that a program listing follows the execution of the program. If the user does not use any of the jump switch options provided, then the Interpreter will follow the program output with a listing of the program. In nearly every instance, the user will want such a listing. In those rare cases when the user feels the program is too lengthy for the complete listing, he may abort the listing using jump switch 2 as prescribed above.

    The data dump routine is rather simple in style, but it is very important to the user when he has a software problem. Therefore, the Interpreter has tried to provide, above all other features, an adequate data dump facility. Another important feature for the user when he has a problem is clear and precise diagnostics. Discussion of the diagnostic system will follow in Section IV.

    Section IV. THE DIAGNOSTIC SYSTEM

    Back To The Table Of Contents

    Back To TLEE's Home Page

    Send email to: tlee6040@aol.com