360 Part 4 The instruction-set processor level: special-function processors
Section 4 Processors based on a programming language
list. The name of the CIA list for the program structure which is to he reactivated on completion or interruption of the current program structure is the second item on the L3 list, etc. Therefore. the L3 list is appropriately called the current CIA list. The "save" and "delete" operations are used to manipulate L3 analogously to their use with L2 previously described.
Appendix 3 gives a more complete schematic representation of the interpretation cycle. It has still been necessary to represent only selected b operations.
Data programs
In the section on list operations a search of a list was described. There the data were passive; the processing program dictated just what steps were taken in covering the list. Consider a similar situation, shown in Fig. 8, where there is a working cell, L100, which contains the name of a list, L300. L300 is a data program. There is a program that wants to process the data of L300, which is a sequence of symbols. This program knows L100. To obtain the first symbol of data, it does (6, 1, L100), that is, "execute the parallel program whose name is in L100" The result is to create a CIA list, L500, put its name in L100, and fire the program. Some sort of processing will occur, as indicated by the blank words of L300. Presumably this has something to do with determining what the data are, although it might be some bookkeeping on L300's experience as a data file. Eventually L700 is reached, which contains (0, 1, L800). This operation stops the interpretation, and returns control to the original processing program. The first symbol of data is defined to be 1L800. The processing program can designate this by 4L100, since the sequence of c = 4 prefixes in L100 and L500 pass along the interpretation until it ultimately becomes 1L800. Now the processing program can proceed with the data. It remains
Fig. 8. Example of a data program.
completely oblivious to the processing and structure that were involved in determining what was the first symbol of data. Similarly, although it is not shown, the processing program is able to get the second symbol of data at any time simply by doing a "continue parallel program 1L100" (b = 7).
One virtue of the use of data programs is the solution it offers for "interpolated" lists. In working on a chess program, for example, one has various lists of men: pawns, pieces, pieces that can move more than one square, such as rooks, queens, etc. One would like a list of all men. There already exists a list of all pieces and a list of all pawns. It would be desirable to compose these lists into a single long list without losing the identity of either of the short lists, since they are still used separately. In other words form a list whose elements are the two lists, but such that, when this list of lists is searched it looks like a single long list. Further, and this is the necessary condition for doing this successfully, one cannot afford to make the program that uses this list of lists know the structure. The operation "execute s" (b = 1) is precisely the operation needed to accomplish this task in a data program. It says "turn aside and go down the sublist s" Since it does not have the operation b = 0, it is not "data." It is simply "punctuation" that describes the structure of the data list, and allows the appropriate symbols to be designated. Figure 9 shows a data list of the kind just described. The authors have taken the liberty of writing in the names of the chessmen.
The stretch of code that follows shows the use of a data program for a "table look up" operation. The table has arbitrary arguments, each of which has a symbol for its value. A1, A2, etc. have been used to represent the arguments. To find the value corresponding to argument A5, for example, A5 is put in the communication cell with (14, 0, A5). Then the data program is executed with (6, 0, L100). Control now lies with the table, which tests each argument against the symbol in the communication lists: i.e., A5, and sets the signal accordingly. The program stops interpreting (b = 8) at the word holding the value only if the arguments are the same. In this case it would stop, designating L550. If no entry was found, of course, control would return to the inquiring program with the signal off.