11.07.2015 Views

Program Logic Manual - All about the IBM 1130 Computing System

Program Logic Manual - All about the IBM 1130 Computing System

Program Logic Manual - All about the IBM 1130 Computing System

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

calls <strong>the</strong> <strong>System</strong> Core Dump program via <strong>the</strong> $DUMPentry point in <strong>the</strong> Skeleton Supervisor to dump <strong>the</strong>statement string, <strong>the</strong> Symbol Table, and <strong>the</strong> FOR-TRAN Communications Area. At <strong>the</strong> completion of<strong>the</strong> dump <strong>the</strong> ROL subroutine regains control. It<strong>the</strong>n fetches and transfers control to <strong>the</strong> next phase.PHASE DESCRIPTIONSPHASE 1• Reads <strong>the</strong> control records; sets <strong>the</strong> correspondingindicators in <strong>the</strong> FORTRAN CommunicationsArea.• Reads <strong>the</strong> source statements; stores <strong>the</strong>m in <strong>the</strong>String Area; precedes each statement with apartially completed ID word.• Checks for a maximum of five continuation recordsper statement.• Lists <strong>the</strong> source program, if requested.Phase 1 is composed of two major segments; <strong>the</strong>first analyzes <strong>the</strong> control records and <strong>the</strong> secondinputs <strong>the</strong> source statements. The control recordanalysis portion of phase 1 is loaded into <strong>the</strong> StringArea, while <strong>the</strong> statement input portion is loaded at<strong>the</strong> normal Phase Area origin. The control recordanalysis subroutines, <strong>the</strong>refore, remain in storageuntil <strong>the</strong> processing of <strong>the</strong> control records is completed.They are <strong>the</strong>n overlaid by <strong>the</strong> source statementsas <strong>the</strong> string is built by <strong>the</strong> statement inputportion.Errors DetectedThe errors detected by phase 1 are: 1 and 2.PHASE 2• Determines <strong>the</strong> statement type for each statement.inserts <strong>the</strong> type code into <strong>the</strong> statement ID word.• Places <strong>the</strong> statement terminator character (semicolon)at <strong>the</strong> end of each statement.• Converts subprogram names longer than fivecharacters to five-character names.• Converts FORTRAN-supplied subprogram namesaccording to <strong>the</strong> specified precision.• Generates <strong>the</strong> calls and parameters that initializeI/O subroutines during execution of <strong>the</strong> object program,if <strong>the</strong> IOCS control indicators are present.According to <strong>the</strong> indicators set in <strong>the</strong> IOCS word(word 16) of <strong>the</strong> FORTRAN Communications Area by<strong>the</strong> previous phase, phase 2 generates <strong>the</strong> requiredcalls to FORTRAN I/O. If <strong>the</strong> Unformatted Disk I/OArea indicator is on, a 'LISP UFIO' followed by itsparameter is inserted into <strong>the</strong> string. If <strong>the</strong> Diskindicator is on, a 'LIEF SDFIO' followed by its parameteris inserted into <strong>the</strong> statement string. If anyo<strong>the</strong>r indicator in <strong>the</strong> IOCS word is on, phase 2 inserts<strong>the</strong> 'LIBF SFIO' followed by its parametersinto <strong>the</strong> statement string. The table of device servicingsubroutines (ISSs) is also built and inserted.Phase 2, beginning with <strong>the</strong> first statement of <strong>the</strong>string, checks each statement in order to classify itinto one of <strong>the</strong> 31 statement types. FORMAT statements,already having <strong>the</strong> type code, and compilergeneratederror statements are not processed by thisphase. Each statement name is compared to a tableof valid FORTRAN statement names. Each recognizedstatement name is removed from <strong>the</strong> stringand <strong>the</strong> corresponding ID type code is inserted into <strong>the</strong>statement ID word.Arithmetic statements are detected by location of<strong>the</strong> equal sign (=) followed by an operator o<strong>the</strong>r thana comma. Because of this method of detection,arithmetic and statement function statements bothcarry <strong>the</strong> arithmetic statement ID type until phase 8,which distinguishes <strong>the</strong>m.Names within <strong>the</strong> statement body are convertedinto name code and stored. Names with only one ortwo characters are stored in one word.Phase 2 converts all paren<strong>the</strong>ses, commas, etc. ,into special operator codes. Each operator is storedin a separate word. Also, each arithmetic operator(+, /, *, **) is stored in a separate word, and astatement terminator character (semicolon) is placedafter each statement, except for CONTINUE andFORMAT statements and compiler-generated errorstatements.NOTE: The string words containing name or constantcharacters have a one in bit position 0. Bit82

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!