• Keine Ergebnisse gefunden

THE INPUT SYSTEM - INTRAN

Im Dokument SHARE System for the IBM 709 (Seite 147-152)

FAD XCA

CHAPTER 1: THE INPUT SYSTEM - INTRAN

This chapter deals with the INTRAN vocabulary of SOS. This vocabulary consists entirely of system macros.

INTRAN provides the programmer with two tools:

1. A large set of fundamental subroutines, each of which performs one of the basic input functions required for a general class of external information.

2. An easy means of specifying that one of these fundamental subroutines is to be used, i. e., by a single macro.

These basic subroutines may in turn be used as building blocks to construct higher-level subroutines. Such a higher-level subroutine might be designed to cover part or all of the input processing required in a very large class of problems, and thus be made a standard input program. The nature and range of these input programs will vary widely and may be chosen to suit the particular needs of the installation. By using the INTRAN macros the programmer will find that the task of constructing such programs is greatly simplified.

On the other hand, for a given production problem with certain input requirements (perhaps peculiar to the problem), the programmer may choose to write his own subprograms, as part of his total source program. In such a case, he will find that the direct use of the INTRAN macros in his program will be of great value.

RULES FOR SPECIFYING INTRAN MACROS

The general rules for specifying any SOS instruction (see Section 02) apply to all INTRAN macros. For example, the location field of a macro may contain a symbol, the variable field is divided into subfields separated by commas, etc.

As is the case of all macro-instructions, a location symbol of an INTRAN macro will be associated with the first word generated by the instruction, i. e., the location symbol will be entered into the dictionary of symbols with the value assigned to the first word generated by the macro-instruction.

A list of all the INTRAN macro-operations and their expansions is given on page 07. 01. 53. Those macro-operations for which indirect addressing is permissible are so indicated. Indirect addressing is, as usual, specified by placing the character

"*,,

at the end of the operation code.

07.01. 01 5 (6/61)

The list of macros also indicates the pattern of the variable field of each macro.

As is evident, the number of subfields which must be specified in the variable field is fixed for each macro, but- among all the macros, this number varies from zero to at most six. The programmer may, of course, specify zero values for the last n subfields, along with their separating commas. The roles played by these various subfields and the rules for specifying the subfields depend, in general, on the operation, and are discussed below.

By definition, a macro-instruction always generates, or "expands into", one or more machine words. The number of words in the expansion of any macro depends only on the macro-operation used in the instruction, and not on the

values of the expressions in the variable field. In fact, every SOS macro (whether a programmer or a system macro) has this property, i. e., its use in a macro-instruction always results in a fixed number of generated words, where this number is determined solely by the macro-operation itself .

. The expansions for the different Input macros vary in size from two to at most five words. For example, the INTRAN macro will always generate two words, whereas the IFLOAT macro will always generate five words. The number of words generated by a given INTRAN macro and the number of sub-fields required in the variable field of such an instruction are directly related.

The relation between these two numbers is due to the fact that the set of words generated by a macro-instruction is simply a calling sequence, which, of course, must contain all of the information specified in the variable field of the mac.ro-instruction.

It can be seen that the first two words generated by any INTRAN macro are an STL instruction and a TXL instruction. When these two instructions are later executed, their effect will be to save the contents of the instrqction location counter and to transfer control to the INTRAN program. The INTRAN program consists of a set of subroutines which are executed at object program time.

These subroutines carry out the functions prescribed by the particular macro, using the information which it finds in the words, if any, immediately following the TXL instruction in the macro expansion. Finally, control will be transferred back to the first word immediately following the expansion, and execution of the object program will continue. Note: For certain macro-operations, and under certain conditions (such as error conditions, etc.) which will be discussed later, control may be transferred to some special location.

07.01.02 5 (6/61)

SPECIAL REGISTERS AND INDICATORS

Whenever the INTRAN program is entered by a calling sequence generated by a macro, the contents of the AC and MQ, and the statuB of the AC Overflow indicator are destroyed. However, the INTRAN program will not disturb the contents of any of the three index registers, the Sense Indicator register, the status of the Sense lights, or any of the special indicators on the 709/7090.

However, it is possible that the status of the Tape Check indicator, the End-of-Tape indicator, or the End-of-File indicator associated with a given Data Synchronizer Channel will be affected by an ISCRffi or ffiEADY instruction which uses that channel for tape operations.

PURPOSE OF THE INPUT SYSTEM

The Input System was designed to simplify the problem of obtaining information to be processed by an object program. This information will usually originate from Hollerith punched cards, and processing of the information will usually require conversion, particularly from decimal to binary.

The external information which can be processed by the Input System must consist of one or more "unit records." A unit record may take on any of the four following physical forms:

1. A card punched with 72 columns of Hollerith information to be read on-line by a 709 card reader. (Hollerith cards, when read, are automatically converted to BCD form. )

2. A BCD tape record consisting of n words (i. e., 6n characters), where n is a positive integer. The usual case will be n = 14 (i. e., 84 characters), arising from an 80-column card written on tape by off-line card-to-tape operation.

3. A 72-column column binary (rather than row binary) card to be read on-line by a 709 card reader.

*

4. A binary tape record consisting of 28 words. Such a record normally originates from a column binary card which has been written on tape by off-line card-to-tape equipment.

*

By convention, a card punched in column binary must contain 7- and 9-punches in column 1 to distinguish it from a Hollerith card. This simultaneous occurrence of 7- and 9-punches, which may be accompanied by punches in any of the other rows of column 1, is of course impossible in a card punched in Hollerith code.

07.01.03 5 (6/61)

The binary information contained in a unit record of form 3 or 4, above, can be quite arbitrary. Since this information is already represented in binary, there is no conversion problem. The only concern of the Input System with such a record will be to read it into core storage.

The maj or part of the Input System is devoted to the problem of extracting

strings of BCD characters (six-bit groups) from a record of the form 1 or 2, and converting these strings (which may represent floating point decimal numbers, fixed point decimal numbers, decimal integers, octal integers, or binary integers) to an appropriate binary representation.

The rules for representing these various' kinds of numbers by forming such character strings conform to the rules for DEC and OCT (see Section 03), but are more inclusive. These rules are described below with the appropriate macro.

Hollerith cards or BCD tape records might also contain information which requires no conversion when read. Such information may consist of any of the set of 50 allowable Hollerith characters, including the character "blank." Two macros (IBCC and mCW) are provided to treat such information.

The INTRAN language is designed around the principle of processing a single unit record at a time.

There are two stages which, in general, the programmer must specify for the processing of every unit record:

1. Read-in Stage:

The unit record is read, from a card reader or a tape unit, into a region of core storage in its external form. No conversion will have been done at the end of this stage, except for a standard Hollerith-to-BCD conversion if the record is a Hollerith card, i. e., the conversion which would be performed automatically by the card-to-tape peripheral equipment when used to produce a 12-word BCD tape record from a 72-column Hollerith card.

2. Internal Processing Stage:

The information, after passing through the read-in stage, is processed according to the format specified by the programmer. If the information is from a column binary card or a binary tape, it is simply moved to some other region in core storage. If the information is from a Hollerith card or a BCD tape, it will generally be broken up into sub-strings which are converted to binary and moved to specified core storage locations.

07.01. 04 5 (6/61)

The programmer is provided with five macros which apply to the read-in stage.

With the exception of the two macros llMAGE and INTRAN, which apply to both stages, all remaining macros are directly concerned with the internal processing stage.

The remainder of this chapter is devoted to detailed descriptions of the INTRAN macros. Note that, with a few exceptions, the subfields of the variable field can be any arithmetic expression, just as in an ordinary symbolic instruction.

The exceptions will be specifically stated in the descriptions.

!IMAGE Y, T, C

The I-region of core (so-called because it contains the "image" of the external record) is essentially a "buffer" area which links the read-in stage with the internal processing stage. A fixed part of the storage occupied by INTRAN is automatically set aside for the I-region, and normally the programmer need not make any reference to it. The I-region consists of two adjacently located

regions, 11 and 12' each of length 28 words. The reason for the dual regions will be seen under the description of the ISCRID macro.

28 words is sufficient to accommodate a unit record of any of the four possible forms described above, with the exception of a BCD tape record consisting of more than 28 words. In this case, the programmer must specify a non-normal I-region of his own. To do this, he may simply write an instruction of the form llMAGE Y, T, C. The effective address Y-c(T) is the location of the first word of the I-region, and C is one-half the length of the total I-region (i. e., the length of either one of the two buffers 11 and 12 making up the I-region). For example, the instruction

Operation Variable Field

llMAGE ALPHA, 0, 100

specifies that the I-region is to begin at cell ALPHA and end at cell ALPHA+ 199, with 11 comprising cells ALPHA through ALPHA+99 and 12 comprising cells ALPHA+100 .through ALPHA+199.

All macros* which require an I-region and are executed after the above instruction will automatically use the 100-plus-100 word region specified, rather than the normal I-region, until another llMAG E instruction, or the INTRAN instruction (see below), is executed.

*

In particular, the read-in macros ISCRIB and IREADY, and the internal processing macros IBee, IBeW, IOCTAL, etc.

07.01. 05 5 (6/61)

If a non-normal I-region has been specified, and the programmer wishes to switch back to the normal buffer, * he may specify this by writing the instruction:

Operation Variable Field

IIMAGE

o

The treatment of large BCD tape records is not the only application for IIMAGE.

For example, if the programmer wishes to apply some of the internal processing macros to a region in his own program, he may write an IIMAG E instruction specifying this region. Any subsequent instructions using an internal processing macro will operate on the region defined, until the I-region is redefined (by IIMAGE or INTRAN).

MODAL I-MACROS

Ten of the I-macros** to be described below are active macros in that they are used to specify some dynamic operation, e. g., the operation of reading a unit record into the I-region, or of converting a number from decimal to binary.

Eleven other of the I-macros*** have the passive function of specifying the mode of operation of the active macros, and hence are called "modal" macros. For example, the macro ITMAGE is modal since it is used to specify the destination region (in the case of ISCRm and ffiEADY) or source region (in the case of the active internal processing macros, like lINT, etc.) and hence controls the operation of all the active macros.

For a given modal macro, there is a certain set of active macros controlled by it. This set may consist of a single macro (for instance, the modal macro IPOINT controls only IFIX), or of more than one macro (e. g., IIMAGE controls all ten of the active I-macros). In the following descriptions of the modal macros, a list of all the macros controlled by each will be included. Conversely, the description of each active macro will list all modal macros which control it.

Im Dokument SHARE System for the IBM 709 (Seite 147-152)