Site Map Index Home Frobenius Last Next E-Mail


FAP Assembler

FAP (FORTRAN Assembly Program) was an assembler that translated symbolic coding for the IBM 704, 709, 7090, and 7094 into machine language instructions. FAP was part of an independent FORTRAN monitor that was also provided as part of the IBSYS operating system for the 7090/94.


Generating Data

Two methods could be used to generate data in a specified memory location -- Coding a literal as part of the instruction that used the constant; and using a Pseudo-Instruction. There were three types of data items: Octal, alphameric, and decimal.

A literal was coded in the variable field of an instruction by writing an equal sign ('=') followed by the letter 'O' for octal; 'H' for alphameric; and no character for decimal. The data was then coded following the letter. Numeric data was right justified and alphanumeric data was left justified in the core word.

Examples:

CODING IN ADDRESS FIELDOCTAL CONSTANT STORED IN MEMORY
=HKAREN422151254560
O3765000000003765
=O777777770000777777770000
=43000000000053
=-17400000000021



Two other types of decimal data could be defined: Floating Point numbers and Fixed Point numbers.

Floating point numbers were written with a decimal point and could also, if desired, be expressed in scientific notation with an exponent that consisted of an 'E' followed by a signed or unsigned integer.

ALL CONVERTED TO SAME
FLOATING POINT CONSTANT
1.61765
16.1765E-1
161765.E-5
161765E-5
.161765E1


As an example, a code fragment to multiply PAY by 0.03625 could be coded as follows:
     START     CLA     PAY           LOAD MULTIPLICAND
               FMP     =.03625       MULTIPLY BY CONSTANT OF 3 5/8%

A Fixed Point number was a signed or unsigned decimal number written with or without a decimal. An exponent could be used. The fixed point number had a letter 'B' followed by a signed or unsigned decimal integer. That integer specified the number of binary places in the word to the left of the binary point (not counting the sign bit). B0 represented a 35-bit binary fraction. B15 denoted that the binary point was between the 15th and 16th position. Integral positions were put to the left of the point and fractional positions were to the right of the point. For example, 31.453125B8 was interpreted as:

Binary000011111 (8 Positions plus Sign) . 01110100000000000000000000
Octal37.350
Decimal31.453125

Data could also be generated with Pseudo-Instructions as below described.



FAP Pseudo-Operations

Along with the symbolic machine instructions were about 70 pseudo-codes that directed the assembly process. Most of the pseudo-codes were seldom used and will not be discussed here.

The pseudo-instructions were coded in the same way as regular machine instructions in that they were coded in the operation columns.

The most important pseudo-operations were the following:

FAP PSEUDO-OPERATIONS
PSEUDO OPERATIONPURPOSE
'BCI'Generate Binary Coded Information
'BSS'Reserve Block of Storage
'CALL'Link to Externally Defined Subroutine
'COMMON'Allocate Common Storage
'COUNT'Assembly Information
'DEC'Generate Decimal Data
'EQU'Define Symbols
'END'Define End of Source
'MACRO'Define Macro-Instruction
'OCT'Generate Octal Data
'PZE'Insert Zeros in S, 1, 2 Positions of Word and Define Rest of Instruction Word in Normal Way

Examples:
     AX        EQU     50     SET SYMBOL EQUAL TO 50

     ALPHA     EQU     BETA   SET SYMBOL ALPHA EQUAL TO WHATEVER BETA IS EQUAL TO

     STMT      OCT     375    INITIALIZE CONTENTS OF LOCATION STMT TO O375

     TING      DEC     3.75   INITIALIZE CONTENTS OF LOCATION TING TO FLOATING POINT 3.75

     NUTS      DEC     31.453125B8 INITIALIZE CONTENTS OF LOCATION NUTS to 00001111101110100000000000000000000 (Binary)

     HOLRTH    BCI     2, ALISON DAVIS INITIALIZE CONTENTS OF TWO WORDS TO 'ALISON' AND 'DAVIS '

Reserving Storage

The pseudo-instruction BSS was used to reserve memory:
     DATA     BSS     100

The statement reserved 100 words of core storage and assigned DATA as the address of the first location. BSS was also used to define single data locations not otherwise defined.

The COMMON pseudo-instruction allowed different subroutines to use the same variables and was, apparently, similar in use to the FORTRAN COMMON directive:
     COMMON     A, B, C       FIRST THREE LOCATIONS OF COMMON ARE A, B, C


Macros

The FAP assembler allowed definition of Macros by writing the name of the macro in the location field; the word MACRO in the operating field; and a list of prototype variables in the variable field.

The defining statement was then followed by a list of statements that used the prototype variables in the instructions. END signaled the end of the macro definition.

Example: A macro to sum the squares of two variables:
     SUMSQ     MACRO     X, Y, SUM     DEFINITION OF NAME AND PROTOTYPE
               LDQ       X
               FMP       X             CALCULATE X * X
               STO       SUM
               LDQ       Y
               FMP       Y             CALCULATE Y * Y
               FAD       SUM           X * X + Y * Y
               STO       SUM           STORE SUM
               END                     END OF MACRO

To use a macro, the programmer would code the macro name followed by the list of actual variables that would replace the prototype variables. Using the SUMSQ macro defined above, Z = A*A + B*B could be calculated by:
               SUMSQ      A, B, Z

FAP Formats

Press to see a scanned image of the standard 7090/94 Coding Form (302Kb).

Press for a scanned image of an actual 7094 assembly language listing (79Kb -- printed on the day the web page author started fifth grade in Paducah out in the wilds of West Texas (September 5, 1962 -- I remember it well)).


http://www.frobenius.com/fap.htm -- Last Revision: 23 August 2001
Copyright © 1996 - 2014 Jack Harper (unless otherwise noted)
Site Map Index Home Frobenius Last Next E-Mail