Est. 1965 Intermediate

IBM 1130 Basic FORTRAN IV

IBM's FORTRAN for the 1130 and 1800 computers: a compact subset of FORTRAN IV, with integer and real types only, whose compiler ran in 4,096 words of core and which was widely used on the 1130

Created by IBM (1130 programming systems; the 1968 manual edition came from the IBM Nordic Laboratory, Lidingö, Sweden)

Paradigm Procedural, Imperative
Typing Static, implicit by first letter (I-N integer, otherwise real), with explicit INTEGER and REAL statements; integer and real are the only data types
First Appeared 1965
Latest Version GC26-3715-8 (ninth edition, January 1973; revised February 1974), applying to Version 1, Modification 8, and Version 2, Modification 12, of the 1130 Disk Monitor System

IBM 1130 Basic FORTRAN IV is the FORTRAN that IBM supplied with its 1130 Computing System, the small desk-sized scientific computer it announced in February 1965, and with the related IBM 1800 process-control computer. It began life as plain “IBM 1130 FORTRAN” and was retitled IBM 1130/1800 Basic FORTRAN IV Language in 1967. It was a deliberately small FORTRAN IV subset. It had only integer and real types, variable names of at most five characters and no logical IF, but its compiler could run in a machine with just 4,096 words of core. For many 1130 users, FORTRAN was in practice the main way to program the machine: the language they punched onto cards, compiled under the Disk Monitor System and ran on the same machine.

History & Origins

FORTRAN for an inexpensive computer

IBM introduced the 1130 on 11 February 1965 as a machine “designed for individual use by engineers, scientists and mathematicians”. It had 16-bit words, 4,096 to 32,768 words of core memory, no hardware floating point, and either cards or paper tape for input. A FORTRAN compiler was part of the basic programming package from the start, alongside the assembler, utility routines and a subroutine library.

IBM’s first manual for the language, IBM 1130 FORTRAN Language (Form C26-5933, copyright 1964 and 1965), gives the minimum configuration for the card/paper tape compiler as the 1130 central processor with a 1442 card read punch or a paper tape reader and punch. It already had a section called Monitor FORTRAN for the disk-based 1130 Monitor System, adding CALL EXIT, DEFINE FILE and disk READ, WRITE and FIND statements. Its appendix of “nonstandard items” lists features not contained in the standards defined by the ASA committee X3.4.3, among them mixed-mode expressions, machine indicator tests, literal data in apostrophes, and expressions of the form A**B**C.

The “Basic FORTRAN IV” name

In 1967 the language manual became IBM 1130/1800 Basic FORTRAN IV Language (Form C26-3715). From then on one manual covered six programming systems: the 1130 Card/Paper Tape System, the 1130 Disk Monitor System (Version 1), the 1130 Disk Monitor System, Version 2 (DM2), and the 1800 Card/Paper Tape, Time-Sharing Executive (TSX) and Multiprogramming Executive (MPX) systems. The 1968 edition gives the IBM Nordic Laboratory in Lidingö, Sweden, as the address for reader comments.

The word “Basic” has nothing to do with the BASIC language. In 1966 two American FORTRAN standards were approved: a full FORTRAN (X3.9-1966, the standard now called FORTRAN 66) and a smaller Basic FORTRAN (X3.10-1966). The 1968 and 1973 manuals state that “the 1130/1800 FORTRAN language contains all of the features defined in American Standard Basic FORTRAN, X3.10-1966, with significant extensions beyond this standard”, and they include a feature-by-feature comparison table against both standards.

Design Philosophy

Everything about 1130 FORTRAN follows from the size of the machine. A minimum 1130 had 4,096 sixteen-bit words of core, and the compiler had to fit in that space alongside the programmer’s code. IBM’s answer was to keep the language that a scientist or engineer needed every day (arithmetic, arrays, loops, formatted I/O and subprograms) and to leave out what was expensive:

  • Two data types. Integer and real only. There is no double precision, complex or logical type. Instead of a DOUBLE PRECISION type, the precision of all real values in a program is chosen at compile time.
  • No logical expressions. There are no relational operators (.LT., .EQ.), no logical operators and no logical IF. Decisions use the three-way arithmetic IF.
  • Short names. Variable names are one to five characters, a limit that matched the 1130’s five-character program and file names.
  • Overlays rather than memory. Programs too big for core could be split into separately loaded links (CALL LINK), and DM2 could load subprograms only when they were called (the LOCAL facility).
  • Direct access to the hardware. Library CALLs test and set the console’s sense lights, data entry switches and overflow indicators.

Key Features

Source format

Programs follow the standard fixed FORTRAN card layout: a statement number in columns 1-5, a continuation mark in column 6 (up to five continuation lines), the statement in columns 7-72, and identification or sequence numbers in columns 73-80. A C in column 1 marks a comment.

Data types and arithmetic

Feature1130 Basic FORTRAN IV
TypesINTEGER and REAL only; implicit typing by first letter (I-N integer, otherwise real), overridden by type statements
Integers-32768 to +32767; per the manual, integer overflow reverses the sign without any warning
Standard precision realTwo words; about 23 significant bits (“6 plus significant digits”)
Extended precision realThree words; about 31 significant bits (“9 plus significant digits”), selected for the whole program with an *EXTENDED PRECISION control record
Real rangeMagnitudes up to about 10^38 and down to about 10^-39
ArraysUp to three dimensions
Mixed-mode arithmeticAllowed (an extension to the standard)

Statements

The statement set is small enough to list in full:

GroupStatements
Assignmentarithmetic assignment, statement functions
ControlGO TO, computed GO TO, arithmetic IF, DO, CONTINUE, PAUSE, STOP, END, CALL
Input/outputformatted READ/WRITE with FORMAT; unformatted I/O; disk READ (a'b), WRITE (a'b), FIND (a'b); REWIND, BACKSPACE, END FILE (DM2)
SpecificationINTEGER, REAL, EXTERNAL, DIMENSION, COMMON, EQUIVALENCE, DATA, DEFINE FILE
SubprogramsFUNCTION, SUBROUTINE, RETURN
Monitor and machine CALLsCALL EXIT, CALL LINK, CALL LOAD, CALL PDUMP, CALL SLITE, CALL SLITET, CALL OVERFL, CALL DVCHK, CALL DATSW, CALL SSWTCH (1800 only), CALL TSTOP, CALL TSTRT, CALL FCTST

Not every statement exists on every system. The manual’s cross-reference table shows, for example, that DATA, unformatted I/O and the T format code are available under DM2 but not under the card/paper tape compiler. The specification statements also had to appear in a fixed order: type statements, EXTERNAL, DIMENSION, COMMON, EQUIVALENCE, then statement functions.

One machine-indicator name shows the five-character limit at work. The manual notes that SSWTCH, SLITET and OVERFL have six characters “in order to be compatible with other IBM FORTRANs”, and the compiler quietly shortens them to SSWTC, SLITT and OVERF.

Devices as unit numbers

I/O statements name devices by logical unit number. Under DM2 these are fixed:

UnitDevice
1Console printer
21442 card read punch
31132 printer
41134 paper tape reader / 1055 paper tape punch
51403 printer
6Keyboard
71627 plotter
82501 card reader
91442 card punch, model 5
10Unformatted I/O area on disk

Compiler control records

Compilation options were given on control cards between // FOR and the program. Among them were *ONE WORD INTEGERS, *EXTENDED PRECISION, *IOCS(...) to name the devices used, *LIST SOURCE PROGRAM, and two debugging aids, *TRANSFER TRACE and *ARITHMETIC TRACE. At run time, tracing printed only while console data entry switch 15 was on, and the program could switch it off and on with CALL TSTOP and CALL TSTRT.

A complete job

The following DM2 job compiles and runs a program that uses a statement function, a DO loop and Euclid’s algorithm written with an arithmetic IF:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// JOB
// FOR
*ONE WORD INTEGERS
*IOCS(1132 PRINTER)
*LIST SOURCE PROGRAM
C     HELLO, A STATEMENT FUNCTION, A DO LOOP AND AN ARITHMETIC IF
      F(C) = 1.8*C + 32.0
      WRITE(3,10)
   10 FORMAT(' HELLO, WORLD')
      DO 30 I = 1, 5
      C = 25.0*FLOAT(I-1)
      FA = F(C)
      WRITE(3,20) C, FA
   20 FORMAT(' CELSIUS', F7.1, '   FAHRENHEIT', F7.1)
   30 CONTINUE
C     GREATEST COMMON DIVISOR OF 1071 AND 462 BY EUCLID
      M = 1071
      N = 462
   40 IF (N) 50, 60, 50
   50 L = M - (M/N)*N
      M = N
      N = L
      GO TO 40
   60 WRITE(3,70) M
   70 FORMAT(' GCD IS', I5)
      CALL EXIT
      END
// XEQ

Run on the open-simh IBM 1130 simulator with the DM2 (V2 M12) disk image from ibm1130.org, the compiler reports PROGRAM 166 words and VARIABLES 10, and the 1132 printer output is:

1
2
3
4
5
6
7
HELLO, WORLD
CELSIUS    0.0   FAHRENHEIT   32.0
CELSIUS   25.0   FAHRENHEIT   77.0
CELSIUS   50.0   FAHRENHEIT  122.0
CELSIUS   75.0   FAHRENHEIT  167.0
CELSIUS  100.0   FAHRENHEIT  212.0
GCD IS   21

Running it showed two of the language’s limits:

  • No function calls in I/O lists. A first version wrote WRITE(3,20) C, F(C). The compiler rejected it with error C47, “syntax error in input/output list”, so the result goes into FA first.
  • No exclamation mark. The greeting has no ! because the 1130/1800 FORTRAN character set has none. The manual lists the 53 characters it handles and says that “any invalid character is printed as an ampersand”, which is exactly what the simulator printed for HELLO, WORLD!.

Statement 10 uses an apostrophe literal in a FORMAT, an extension to the standard. The leading blank in each format is the carriage-control character.

Evolution

PeriodFormNotes
1965IBM 1130 FORTRAN Language (C26-5933)Card/paper tape compiler, plus Monitor FORTRAN disk statements
1967IBM 1130/1800 Basic FORTRAN IV Language (C26-3715)One language for the 1130 and IBM 1800 systems
1968C26-3715-3Adds the 1800 MPX system; compares the language with USA Standard FORTRAN and Basic FORTRAN
1973-74GC26-3715-8 and TNL GN34-0181Applies to Disk Monitor Version 1, Modification 8, and Version 2, Modification 12

IBM’s own 1130 compiler remained a subset, and others filled the gap. EMU FORTRAN, by C. David Morse and Peter Diehr at Eastern Michigan University, was sold by DNA Systems. According to ibm1130.org, it was originally based on IBM’s version but added LOGICAL variables, relational operators, logical IF statements, formatted random and sequential disk I/O, and full-text error messages. The site says it has the manual but is still hoping someone has the source on tape.

The 1130 had no compatible successor. The latest edition of the language manual found for this page is the 1973 printing, revised in February 1974, and IBM’s later small systems, such as the System/7 and Series/1, used different architectures.

Current Relevance

1130 Basic FORTRAN IV is a historical language, but it is easy to run today. Brian Knittel’s IBM 1130 simulator, part of SIMH and now maintained in the open-simh project, runs the Disk Monitor System, Release 2 Version 12. The ibm1130.org download includes a ready-to-run DM2 disk image “containing Disk Monitor System Release 2 Version 12 (DMS R2V12), Fortran and the Macro Assembler”, along with a few small Fortran sample jobs. The example above was compiled and run that way on a current macOS system, with the simulator built from open-simh source.

IBM’s manuals survive in scanned form on Bitsavers and the Internet Archive. The January 1973 edition of the language reference has a text layer and is a practical reference for anyone writing programs for the simulator.

Why It Matters

1130 Basic FORTRAN IV shows how far FORTRAN could be cut down while staying useful. With no logical type, no double precision and five-character names, it still let engineers and students write real programs, in a compiler small enough for a 4K-word machine. Its manual’s careful comparison against the 1966 Basic FORTRAN standard reflects the period when FORTRAN went from vendor dialects to an agreed standard.

Its influence came through the people who used it. IBM’s Scientific Subroutine Package brought statistics and matrix routines to 1130 FORTRAN programmers. Chuck Moore’s FORTH was, for a time, an interpreter written in 1130 Fortran, until Moore extended his 2250 cross-assembler into an 1130 compiler. For many engineers and students of the period, a deck of FORTRAN cards fed into an 1130 was reportedly their first experience of programming.

Timeline

1965
IBM announces the 1130 Computing System on 11 February. Its first FORTRAN manual, IBM 1130 FORTRAN Language (Form C26-5933, copyright 1964 and 1965), describes a card/paper tape FORTRAN compiler, plus extra Monitor FORTRAN statements for disk files
1966
Two American FORTRAN standards are approved, X3.9-1966 (FORTRAN) and X3.10-1966 (Basic FORTRAN). IBM later measured its 1130/1800 language against both
1966
IBM's December 1966 1130 Program Catalog lists the 1130 FORTRAN compilers (1130-FO-001 and 1130-FO-002) and the Scientific Subroutine Package, SSP/1130, described as a collection of 121 FORTRAN subroutines
1967
IBM issues the language manual under a new title, IBM 1130/1800 Basic FORTRAN IV Language (Form C26-3715, first copyright 1967), as one language for the 1130 and the process-control IBM 1800
1968
The fourth edition of the manual (C26-3715-3) adds the IBM 1800 Multiprogramming Executive. Its comparison table shows the 1130 Disk Monitor System, Version 2 compiler supporting DATA statements, unformatted I/O and T format, which the card/paper tape compiler lacks
1968
At Mohasco Industries, around 1968, Chuck Moore ports his interpreter to Fortran on an IBM 1130 with 8K of memory, a disk and a 2250 display. Moore says the interpreter's file was labelled FORTH, for fourth-generation software, because the operating system limited file names to five characters
1973
IBM publishes the ninth edition of the manual (GC26-3715-8) in January. It applies to Version 1, Modification 8, and Version 2, Modification 12, of the 1130 Disk Monitor System, among other 1130 and 1800 systems, and a Technical Newsletter revised it again in February 1974

Notable Uses & Legacy

IBM 1130 Scientific Subroutine Package (SSP/1130)

IBM's program 1130-CM-02X, which the December 1966 catalog describes as 121 input/output-free FORTRAN subroutines for statistics (analysis of variance, regression, factor analysis, time series), matrix work (inversion, eigenvalues, simultaneous equations) and other mathematics, for research, development and design work.

IBM 1130 Commercial Subroutine Package (CSP)

Program 1130-SE-25X. IBM's 1969 bibliography says it was 'for 1130 users with a knowledge of FORTRAN' and was intended to give commercial capability to users of 1130 FORTRAN, though not to make FORTRAN a complete commercial language.

The Fortran precursor of Forth (Mohasco Industries)

Chuck Moore's HOPL paper says that around 1968 he ported his interpreter 'back to Fortran' on an IBM 1130, added a cross-assembler to generate code for the IBM 2250 display, and coded Spacewar on it. He later extended that cross-assembler into an 1130 compiler, because the environment was 'far superior to the Fortran environment'.

IBM 1130 application programs

IBM's December 1966 catalog includes contributed 1130 programs such as 'CPM/PERT for the IBM 1130, FORTRAN Coded', a critical-path scheduling program. Many of the contributed engineering, scheduling and statistics programs listed in IBM's catalogs were written in FORTRAN.

Language Influence

Influenced By

Running Today

Run examples using the official Docker image:

docker pull
Last updated: