IBM 1130
Encyclopedia
The IBM 1130 Computing System was introduced in 1965. It was IBM
IBM
International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

's least-expensive computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 to date, and was aimed at price-sensitive, computing-intensive technical markets like education and engineering. It succeeded the IBM 1620
IBM 1620
The IBM 1620 was announced by IBM on October 21, 1959, and marketed as an inexpensive "scientific computer". After a total production of about two thousand machines, it was withdrawn on November 19, 1970...

 in that market segment. The IBM 1800
IBM 1800
The IBM 1800 Data Acquisition and Control System was a process control variant of the IBM 1130 with two extra instructions , extra I/O capabilities, 'selector channel like' cycle-stealing capability and three hardware index registers....

 was a process control
Process control
Process control is a statistics and engineering discipline that deals with architectures, mechanisms and algorithms for maintaining the output of a specific process within a desired range...

 variant of the 1130 with two extra instructions
Instruction set
An instruction set, or instruction set architecture , is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O...

 (CMP and DCM) and extra I/O
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...

 capabilities. The IBM 1500
IBM 1500
The IBM 1500 instructional system was introduced by IBM on March 31, 1966 and its primary purpose was to implement Computer Assisted Instruction . Based around either an IBM 1130 or an IBM 1800 computer, it supported up to 32 student work stations each with a variety of audiovisual...

 instructional system was introduced by IBM on March 31, 1966 and was based around either an IBM 1130 or an IBM 1800 computer, it supported up to 32 student work stations each with a variety of audiovisual capabilities.

Description

The 1130 became quite popular, and the 1130 and its non-IBM clones gave many people their first feel of "personal computing." Its price-performance ratio was good and it notably included inexpensive, removable disk storage
Disk storage
Disk storage or disc storage is a general category of storage mechanisms, in which data are digitally recorded by various electronic, magnetic, optical, or mechanical methods on a surface layer deposited of one or more planar, round and rotating disks...

, with a reliable, easy to use disk operating system that supported several high level languages. The low price and well balanced feature set made interactive "open shop" program development
Software development
Software development is the development of a software product...

 available to a large number of users for the first time. The 1130 holds a place in computing history in part because of the fondness its former users hold for it.

Processor and memory

The IBM 1130 used System/360
System/360
The IBM System/360 was a mainframe computer system family first announced by IBM on April 7, 1964, and sold between 1964 and 1978. It was the first family of computers designed to cover the complete range of applications, from small to large, both commercial and scientific...

 electronics packaging called Solid Logic Technology
Solid Logic Technology
Solid Logic Technology was IBM's method for packaging electronic circuitry introduced in 1964 with the IBM System/360 series and related machines. IBM chose to design custom hybrid circuits using discrete, flip chip-mounted, glass-encapsulated transistors and diodes, with silk screened resistors...

 (SLT) and had a 16-bit
16-bit
-16-bit architecture:The HP BPC, introduced in 1975, was the world's first 16-bit microprocessor. Prominent 16-bit processors include the PDP-11, Intel 8086, Intel 80286 and the WDC 65C816. The Intel 8088 was program-compatible with the Intel 8086, and was 16-bit in that its registers were 16...

 binary architecture, not very different from later minicomputer
Minicomputer
A minicomputer is a class of multi-user computers that lies in the middle range of the computing spectrum, in between the largest multi-user systems and the smallest single-user systems...

s like the PDP-11
PDP-11
The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corporation from 1970 into the 1990s, one of a succession of products in the PDP series. The PDP-11 replaced the PDP-8 in many real-time applications, although both product lines lived in parallel for more than 10 years...

 or Data General Nova
Data General Nova
The Data General Nova was a popular 16-bit minicomputer built by the American company Data General starting in 1969. The Nova was packaged into a single rack mount case and had enough power to do most simple computing tasks. The Nova became popular in science laboratories around the world, and...

.

The address space
Address space
In computing, an address space defines a range of discrete addresses, each of which may correspond to a network host, peripheral device, disk sector, a memory cell or other logical or physical entity.- Overview :...

 was 15-bits, limiting the 1130 to words of core memory. Both direct and indirect addressing capabilities were implemented.

IBM 1130s with an 'A' in their model number were delivered with of core memory, 'B' models with of core memory, 'C' models with , and 'D' models with the maximum supported of core memory.

Software

Much programming was done in Fortran
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

. The 1130 Fortran compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 could run on a machine with only 4,096 words of core. To maximize speed and conserve space, the operating system and compilers were written entirely in assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

, and employed techniques seen less frequently today including tight integration of code and data as well as self-modifying code
Self-modifying code
In computer science, self-modifying code is code that alters its own instructions while it is executing - usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively similar code, thus simplifying maintenance...

. The compiler was broken into many small "phases" that were linked to successively, each phase performing its own modifications of the representation of the source on their way towards machine code. Thus the first phase would read the source statements into memory, discarding comment lines, squeezing out all spaces (fortran syntax is unusual in that spaces are nowhere significant outside text literals) concatenating continuation lines and identifying labels, and performing no syntax checking beyond what might be discovered during this stage. It was available in a disk resident version, as well as on 8-channel punched paper tape
Punched tape
Punched tape or paper tape is an obsolete form of data storage, consisting of a long strip of paper in which holes are punched to store data...

 or punched cards. In order to permit the use of programs that were too large to fit in main memory "all at one time", the implementation of the Fortran
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

 language permitted any subroutine to be designated as a "LOCAL", which stood for "Load-on-Call Subroutine". The operating system would also designate the floating-point arithmetic routines LOCAL at need. This use of disk-resident (overlay) code required the executable code for such a subroutine to be "loaded" [read] from disk in to main memory, (if it was not already present in main memory) when that subroutine was "called" (invoked). A collection of say six such routines would require only as much storage as the largest, rather than the total amount for all six.

Other programming languages available on the 1130 included: APL
APL programming language
APL is an interactive array-oriented language and integrated development environment, which is available from a number of commercial and noncommercial vendors and for most computer platforms. It is based on a mathematical notation developed by Kenneth E...

, BASIC, COBOL
COBOL
COBOL is one of the oldest programming languages. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments....

, FORTH, PL/I and RPG
RPG programming language
RPG is a high-level programming language for business applications.It has a long history, having been developed by IBM in 1959 as the Report Program Generator - a tool to replicate card processing on the IBM 1401 then updated to RPG II for the IBM System/3 in the late 1960s, and since evolved into...

. Even an Algol compiler, but in French, so "Debut ...Fin;" rather than "Begin ... End;" and with all messages in French, so "Bonne compilation" was the goal. Eastern Michigan University
Eastern Michigan University
Eastern Michigan University is a comprehensive, co-educational public university located in Ypsilanti, Michigan. Ypsilanti is west of Detroit and eight miles east of Ann Arbor. The university was founded in 1849 as Michigan State Normal School...

 developed a Fortran IV compiler for the 1130, known as Fortran-EMU as an alternative to the Fortran II compiler provided by IBM. It added many features, including the LOGICAL data type, enhanced diagnostics, and six-letter variable names. Oklahoma State University developed an ALGOL 68
ALGOL 68
ALGOL 68 isan imperative computerprogramming language that was conceived as a successor to theALGOL 60 programming language, designed with the goal of a...

 compiler http://htportal.acm.org/ft_gateway.cfm?id=803425&type=pdf, the compiler was written in ANSI Fortran 1966.

Peripheral devices

The basic 1130 came with an IBM 2310 disk drive. These read pizza-box-sized 2315 single platter cartridges that held 512 K words or 1 M byte (less than a 3.5" HD floppy). Disk memory was used to store the operating system, object code, and data, but not source code. The last was kept on punched card
Punched card
A punched card, punch card, IBM card, or Hollerith card is a piece of stiff paper that contains digital information represented by the presence or absence of holes in predefined positions...

s. The disk operating system was called DMS or DM2 (for Disk Monitor System, Release 2).

Other available peripherals included the IBM 1132
IBM 1132
The IBM 1132 Line Printer was the normal printer for the IBM 1130 computer system. It printed 120 character lines at 80 lines per minute. The character set consisted of numbers, upper-case letters and some special characters....

 and IBM 1403
IBM 1403
The IBM 1403 line printer was introduced as part of the IBM 1401 computer in 1959 and had an especially long life in the IBM product line. The original model could print 600 lines of text per minute and could skip blank lines at up to 75 inches/second. The standard model had 120 print...

 lineprinters, the IBM 1442
IBM 1442
IBM 1442 was a combination IBM card reader and card punch. It read and punched 80-column IBM-format punched cards and was used on the IBM 1440, the IBM 1130, the IBM 1800 and System/360 and was an option on the IBM System/3. The 1442 could read up to 400 cards per minute. Cards were read and...

 card reader/punch, the IBM 2311 Disk Drive, the IBM 2250
IBM 2250
The IBM 2250 Graphics Display Unit was announced as part of System/360 in 1964. Unlike most modern computer displays, which show images in raster format, the IBM 2250 used vector graphics. A display list of line segments on a 1024 by 1024 grid was stored in the computer's memory and repainted on...

 Graphic Display Unit and the IBM 1627
IBM 1627
The IBM 1627 was a rebranded Calcomp plotter sold by IBM for use with the IBM 1620, and, later, the IBM 1130 computers. It became perhaps the first non-IBM peripheral that IBM allowed to be attached to one of its computers....

 drum plotter. The plotter was very useful for engineering work. The console typewriter used an IBM Selectric mechanism, which meant one could change the type by replacing a hollow, golf-ball sized type element. There was a special type element available for APL
APL programming language
APL is an interactive array-oriented language and integrated development environment, which is available from a number of commercial and noncommercial vendors and for most computer platforms. It is based on a mathematical notation developed by Kenneth E...

, a powerful array-oriented programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 using a special symbolic notation. A row of 16 toggle switches on the console typewriter could be individually tested from within programs, using the Fortran statement IF (SENSE SWITCH i), for example.

The IBM 1130 MTCA, for Multiple Terminal Control Adapter, was announced late in the product life of the 1130; it allowed up to four 2741 terminals to be connected to an IBM 1130, for use with APL.

From 1968, IBM 2415 Magnetic tape data storage
Magnetic tape data storage
Magnetic tape data storage uses digital recording on to magnetic tape to store digital information. Modern magnetic tape is most commonly packaged in cartridges and cassettes. The device that performs actual writing or reading of data is a tape drive...

 drives were available as an RPQ.

A standard 1130 had a 3.6 microsecond memory cycle time, with a more expensive model equipped with 2.2 µs memory cycle time. (You could use the latter with a 1403 printer connected through a 1133 multiplexer
Multiplexer
In electronics, a multiplexer is a device that selects one of several analog or digital input signals and forwards the selected input into a single line. A multiplexer of 2n inputs has n select lines, which are used to select which input line to send to the output...

.) To further tap the low end of the market, IBM introduced the 1130 Model 4, with a 5.6 µs cycle time - at a lower price of course. The Model 4's 1132 printer was derated as well, but the slower CPU still could not keep up with it. (The 1132 used the CPU to determine when to fire the print wheels as they rotated, a very compute intensive function.) Careful readers of the 1130 hardware manual discovered that when the printer interrupt
Interrupt
In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution....

 level (1) or the 1442 column interrupt (0) was on, the 1130 Model 4 ran at the faster 3.6 us cycle time. Some users of the Model 4 would write a phony printer driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

 that turned on level 1 and left it on for the duration of the compute-intensive part of their application. No I/O could take place during this time as even the 1442 used a level 4 interrupt to mark the end of the card.
Level 0 was the highest interrupt level and level 5 was the lowest.

IBM 1130 Models

IBM implemented five models of the 1131 Central Processing Unit which was the primary processing component of the IBM 1130 Computing Systems.
 

no internal disk


plus disks

(70% performance) single disk
2.2-microsec. storage cycle

plus disks
2.2-microsec. storage cycle

(no internal disk)
4096 words
8192 words
16,384 words
32,768 words


The IBM 1800
IBM 1800
The IBM 1800 Data Acquisition and Control System was a process control variant of the IBM 1130 with two extra instructions , extra I/O capabilities, 'selector channel like' cycle-stealing capability and three hardware index registers....

 was a variant of the IBM 1130 with additional features for process control applications. Just as the IBM 1130 was a successor to the IBM 1620
IBM 1620
The IBM 1620 was announced by IBM on October 21, 1959, and marketed as an inexpensive "scientific computer". After a total production of about two thousand machines, it was withdrawn on November 19, 1970...

, the IBM 1800
IBM 1800
The IBM 1800 Data Acquisition and Control System was a process control variant of the IBM 1130 with two extra instructions , extra I/O capabilities, 'selector channel like' cycle-stealing capability and three hardware index registers....

 was a successor to the IBM 1710
IBM 1710
The IBM 1710 was a process control system that IBM introduced in March 1961. It used either a 1620 I or a 1620 II Computer and specialized I/O devices .The IBM 1620 used in the 1710 system was modified in several ways, the most obvious was the addition of a very...

. The IBM 1500
IBM 1500
The IBM 1500 instructional system was introduced by IBM on March 31, 1966 and its primary purpose was to implement Computer Assisted Instruction . Based around either an IBM 1130 or an IBM 1800 computer, it supported up to 32 student work stations each with a variety of audiovisual...

 was a multi user educational system based on the 1130 and 1800.

Chronology

  • Feb. 11, 1965 - IBM introduces the 1130 (Models A1, A2, B1 and B2). Also announced is the IBM 1132 printer, the lowest cost online computer printer ever announced by IBM at that time.
  • Fourth Quarter 1965 - First customer shipments begin from the San Jose plant.
  • August 9, 1966 - IBM rolls out the 1130 synchronous communications adapter, which permits the small 1130 system to be connected by regular leased telephone lines to, and function as a communications terminal for, any model of the IBM System/360.
  • April 17, 1967 - A four-way expansion of the 1130 is announced (Models B3, C2, C3, D2 and D3), involving:
    • five times the disk storage and four times the magnetic core memory size;
    • an additional processing speed almost 40 percent faster than previously available;
    • More and faster peripheral equipment, including an optical mark reader;
    • an improved commercial programming package.
  • January 1968 - First shipments begin of the 1130 Models B3, C2, C3, D2 and D3.
  • July 1968 - The Boca Raton plant begins shipping the 1130.
  • July 22, 1971 - 1130 Models 4A and 4B are introduced at new levels of economy.
  • September 1971 - First customer shipments begin of the 1130 Model 4.
  • May 31, 1972 - Models 1C, 1D, 5B, 5C and 5D are announced.

Influence of the 1130

  • Brian Utley was the 1130s Project Manager
    Project manager
    A project manager is a professional in the field of project management. Project managers can have the responsibility of the planning, execution, and closing of any project, typically relating to construction industry, architecture, computer networking, telecommunications or software...

     during its development and introduction. Brian said at the third 11/30 party that before IBM Marketing named the 1130 it was known as the Small Engineering Computer System or SECS. The initial architecture was 18 bits but was changed to 16 bits due to the influence of the System/360
    System/360
    The IBM System/360 was a mainframe computer system family first announced by IBM on April 7, 1964, and sold between 1964 and 1978. It was the first family of computers designed to cover the complete range of applications, from small to large, both commercial and scientific...

     development. The full dialogue of his 2005 presentation is available at IBM1130.org.

  • Notable software designer Grady Booch
    Grady Booch
    Grady Booch is an American software engineer. Booch is best known for developing the Unified Modeling Language with Ivar Jacobson and James Rumbaugh. Grady is recognized internationally for his innovative work in software architecture, software engineering, and collaborative development environments...

     got his first exposure to programming on an IBM 1130:


... I pounded the doors at the local IBM sales office until a salesman took pity on me. After we chatted for a while, he handed me a Fortran [manual]. I'm sure he gave it to me thinking, "I'll never hear from this kid again." I returned the following week saying, "This is really cool. I've read the whole thing and have written a small program. Where can I find a computer?" The fellow, to my delight, found me programming time on an IBM 1130 on weekends and late-evening hours. That was my first programming experience, and I must thank that anonymous IBM salesman for launching my career. Thank you, IBM.

  • LISP
    Lisp
    A lisp is a speech impediment, historically also known as sigmatism. Stereotypically, people with a lisp are unable to pronounce sibilants , and replace them with interdentals , though there are actually several kinds of lisp...

     guru Guy Steele wrote a LISP interpreter for the IBM 1130 when he was in high school (Boston Latin School, which had an IBM 1130 for student use). His code and documentation for LISP 1.6, along with a summary of current work in getting it to run under simulation, is available at IBM1130.org.

  • Chuck Moore
    Charles H. Moore
    Charles H. Moore is the inventor of the Forth programming language.- Biography :In 1968, while employed at the United States National Radio Astronomy Observatory , Moore invented the initial version of the Forth language to help control radio telescopes...

     wanted to call his new language "Fourth" but the IBM 1130 operating system was limited to five-character names, so it wound up being called FORTH.

  • Dan Bricklin creator of the VisiCalc
    VisiCalc
    VisiCalc was the first spreadsheet program available for personal computers. It is often considered the application that turned the microcomputer from a hobby for computer enthusiasts into a serious business tool...

     program got his start in programming when he learned and used the IBM 1130 as part of the National Science Foundation Computer/Math Summer Project for high school students, given at the University of Pennsylvania in 1966.

  • An IBM 1130 with 8 kilowords of core was used for the world's first full-time Search for Extraterrestrial Intelligence research at The Ohio State University Radio Observatory.

  • Charles Goldfarb
    Charles Goldfarb
    Charles F. Goldfarb is known as the father of SGML and is a co-inventor of the concept of markup languages. In 1969 Charles Goldfarb, leading a small team at IBM, developed the first markup language, called Generalized Markup Language, or GML. In an , Dr...

    , the father of SGML, describes a job installing a typesetting system based on an IBM 1130 that "eventually changed my career", driving him towards generic markup:

The system was an IBM 1130 computer, a machine the size of a desk with 8KB of main memory, a 512KB disk drive, a Teletype CX paper tape reader and BRPE paper tape punch, and a Photon 713 photomechanical typesetter. The assignment was my first experience with managing a machine-readable document database: I learned to roll the punched paper tape carefully so that it could be stored neatly in cylindrical waste paper baskets.
In the meantime, though I didn't know about it, the roots of generalized markup were being planted. Historically, electronic manuscripts contained control codes or macros that caused the document to be formatted in a particular way ("specific coding"). In contrast, generic coding, which began in the late 1960s, uses descriptive tags (for example, "heading", rather than "format-17").
  • Alan Kay
    Alan Kay
    Alan Curtis Kay is an American computer scientist, known for his early pioneering work on object-oriented programming and windowing graphical user interface design, and for coining the phrase, "The best way to predict the future is to invent it."He is the president of the Viewpoints Research...

     used the IBM 1130 in early GUI work for his Ph.D. thesis in 1969.

Software oddities

  • In an early version of the operating system, file headers written by FORTRAN and the early RPG compiler were not compatible. Before using the other language, the file had to be copied.

  • The index registers were replicated in core memory at locations 1, 2 and 3. Index register 0 (IAR) was a genuine hardware register, and memory word zero usually was set to contain a BR *-1, which is to say, a jump to itself. This would trap any jump to location zero, which would surely be an error.

  • The Fortran compiler built the arrays backwards in memory. Variables and arrays declared COMMON started at the highest address, and larger programs would be broken into pieces. Each separate program would choose which to invoke next according to the task's logic, and all would rely on the COMMON storage retaining data across the stages.

  • A disk sector had 320 words or 640 bytes.

  • There was an urban legend at the time of introduction that since it was a small scientific machine, the model number of the IBM 1130 was obtained from multiplying the model number of the IBM 360 by π.

  • Another possible reason the number 1130 was chosen was that when an impasse was reached in a meeting of the product planners that had been convened to select the machine number, one of the planners mentioned that it was 11:30 and time to go to lunch. Another planner then exclaimed: “that’s it, we’ll call it the 1130”.

  • Another reason for the 1130 model number was it was IBM's 11th Computer Design and it had 30 instructions hence 1130.

Instruction set overview


Main Registers:
IAR = Instruction Address Register
ACC = Accumulator
EXT = Extension Register
XRx = Index Registers x = 1,2,3

Condition indicators
+ Positive
- Negative
Z Zero
O Overflow
C Carry
E Even

1130 Instruction Set Mnemonics:
LD = Load ACC STO = Store ACC
LDD = Load Double (ACC & EXT) STD = Store Double (ACC & EXT)
LDX = Load Index STX = Store Index
LDS = Load Status STS = Store Status
A = Add ACC AD = Add Double
S = Subtract ACC SD = Subtract Double
M = Multiply D = Divide
AND = Boolean And OR = Boolean Or
XOR = Boolean Exclusive Or
SLA = Shift Left ACC SLT = Shift Left ACC & EXT
SLCA = Shift Left and Count ACC SLC = Shift Left and Count ACC & EXT
SRA = Shift Right ACC SRT = Shift Right ACC & EXT
RTE = Rotate Right ACC & EXT XCH = Exchange ACC and EXT
MDM = Modify Memory
B = Branch
BSC = Branch or Skip on Condition (Modifier dependent)
i.e. BP BNP BN BNN BZ BNZ BC BO BOD
BSI = Branch and Store IAR
MDX = Modify Index and Skip (Increment IAR one if a sign change or becomes zero)
WAIT = Halt NOP = No Operation
XIO = Execute I/O

1800 Additional Instruction Mnemonics:
CMP = Compare ACC DCM = Double Compare ACC & EXT

Short instruction format (one 16 bit word):
1
Bits 0...45678......5
OP---FTTDisp----

OP is Operation
F is format 0 = Short
TT is Tag
Disp is Displacement

Long instruction format (two 16 bit words):
1 1
Bits 0...456789.....50..............5
OP---FTTIMod----Address---------

OP is Operation
F is format 1 = Long
TT is Tag
I is Indirect bit
Mod is Modifier

Effective Address Calulation (EA):
F = 0 | F = 1, I = 0 | F = 1, I = 1
Direct Addressing| Direct Addressing| Indirect Addressing
-------------------------------------------------------------------
TT = 00 | EA = Displ + IAR | EA = Add | EA = C/Add
TT = 01 | EA = Displ + XR1 | EA = Add + XR1 | EA = C/Add + XR1
TT = 10 | EA = Displ + XR2 | EA = Add + XR2 | EA = C/Add + XR2
TT = 11 | EA = Displ + XR3 | EA = Add + XR2 | EA = C/Add + XR3
-------------------------------------------------------------------
Disp = Contents of displacement field
Add = Contents of address field of instruction
C = Contents of location specified by Add or Add + XR

The design did not employ a stack, neither in hardware nor in software. A subroutine SIMPL would be organised as follows:
SIMPL: DC *-* This is the entry point, filled with a zero initially (DC = Define Constant).
(whatever the routine does)
B I SIMPL Return by an Indirect branch, to the address found in location SIMPL.
END SIMPL Instructs the assembler that the source for routine SIMPLE is complete.
(other code)
BSI L SIMPL To invoke SIMPL. L is for Long, if the destination were more than -128 or +127 words away.
(more code)
Thus the BSI (or CALL) would store at address SIMPL the current value of IAR which would thereby be the return address. The initial value there would be zero, since "*" represents the current address during assembly so that *-* evaluates to zero but is visually distinct. Without extra arrangements to protect the return address, recursion would be impossible (if SIMPL invoked itself or a routine that invoked it, its original return address would be overwritten) and re-entrancy is precluded also for the same reason. Thus, a routine invoked during the processing of an interrupt must not invoke any routine that could have been interrupted. Additional conventions attended parameters, which might follow the BSI instruction either as values or as addresses of values, etc. Routine SIMPL might modify its return address value while accessing those parameters, and would certainly have to increment the value by the correct number of words so that the return would be to the address following the parameters.

By convention, library routines were invoked via index register three. This register would point at a series of entry point addresses, so that a particular routine would be a small offset into that table, thereby enabling the one-word instruction format to be used. Since floating-point arithmetic was performed by software, there would be many invocations of such routines. This protocol is hidden in the assembler source code example by the usage of LIBF. Fortran programs would only ever use index register one, so that register two was unused.

The convention of having a zero as the initial value at the entry point meant that if alas a return was made through the value of an entry point that had not been entered through, execution would jump to location zero of memory, which contained a jump to itself so as to entrap such mistakes.

Programming Examples

The examples can be executed on the IBM 1130 emulator available at IBM 1130.org.

Sample Assembler program deck

The following listing shows a card
Punched card
A punched card, punch card, IBM card, or Hollerith card is a piece of stiff paper that contains digital information represented by the presence or absence of holes in predefined positions...

 deck that compiles and runs an Assembler program that lists a deck of cards to the line printer.

The following code Copyright (c) 2006 Kym Farnik. Code published under MIT license. See: http://www.opensource.org/licenses/mit-license.php


// JOB
// ASM
*LIST
* LCARD.ASM - LIST A DECK OF CARDS TO LINE PRINTER
*
* COPYRIGHT (C) 2006 KYM FARNIK.
* CODE PUBLISHED UNDER MIT LICENSE.
*
* PROGRAM
* NEW PAGE ON PRINTER
* A READ A CARD
* CONVERT FORMAT
* PRINT A LINE ON PRINTER
* GOTO A
*
START LIBF PRNT1 GOTO NEW PAGE ON 1132
DC /3100 PRINTER CHANNEL 1-NEW PAGE
*
NEXTC LIBF CARD0 READ FROM 1442 CARD READER
DC /1000 CONTROL TO READ
DC CBUFF STORE 80 COLUMNS
CINP LIBF CARD0
DC 0
B CINP LOOP UNTIL CARD IS READ
*
LIBF ZIPCO CONVERT CARD TO PRINTER
DC /1100 UNPACKED IN, PACKED OUT
DC CBUFF+1 INPUT BUFFER
DC PBUFF+1 OUTPUT BUFFER
DC 80 CHARACTER COUNT
CALL HLEBC HOLLERITH TO EBCDIC
*
LIBF PRNT1 PRINT 80 CHARACTERS
DC /2000 CONTROL CODE TO PRINT
DC PBUFF PRINT BUFFER
DC PERR PRINT ERROR
POUT LIBF PRNT1 CHECK FOR PRINT COMPLETE
DC 0
B POUT LOOP UNTIL COMPLETE
*
B NEXTC READ NEXT CARD
*
* DATA
*
CBUFF DC 80 80 COLUMNS PER CARD
BSS 80
*
PBUFF DC 40 40 WORDS 80 CHARACTERS
BSS 40
*
PERR DC 0
B I PERR THIS RETURNS TO THE
* PRINTER ERROR HANDLER
* WHICH WILL TERMINATE THE PROGRAM
*
END START PROGRAM ENTRY POINT
// XEQ
TEST DATA 1
HELLO WORLD
TEST DATA 2

Sample Fortran IV program deck

The following listing shows a card
Punched card
A punched card, punch card, IBM card, or Hollerith card is a piece of stiff paper that contains digital information represented by the presence or absence of holes in predefined positions...

 deck that compiles and runs a Fortran
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

 program and Fortran subroutine
Subroutine
In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....

 for the IBM 1130 when running DM2.

The following code Copyright (c) 2005 Kym Farnik. Code published under MIT license. See: http://www.opensource.org/licenses/mit-license.php

// JOB
// FOR
*LIST SOURCE PROGRAM
*ONE WORD INTEGERS
C-------------------------------------------------------
C COMPUTE THE CRITICAL VALUES FOR A QUADRATIC EQN
C 0=A*X**2+B*X+C
C RETURNS DISCRIMINANT, ROOTS, VERTEX, FOCAL LENGTH, FOCAL POINT
C X1 AND X2 ARE THE ROOTS
C-------------------------------------------------------
SUBROUTINE QUADR(A,B,C,DISCR,X1,X2,VX,VY,FL,FPY)
REAL A,B,C,DISCR,X1,X2,VX,VY,FL,FPY

C DISCRIMINANT, VERTEX, FOCAL LENGTH, FOCAL POINT Y
DISCR = B**2.0 - 4.0*A*C
VX = -B / (2.0*A)
VY = A*VX**2.0 + B*VX + C
FL = 1.0 / (A * 4.0)
FPY = VY + FL
FL = ABS(FL)

C COMPUTE THE ROOTS BASED ON THE DISCRIMINANT
IF(DISCR) 110,120,130

C -VE DISCRIMINANT, TWO COMPLEX ROOTS, REAL=X1, IMG=+/-X2
110 X1 = -B / (2.0*A)
X2 = SQRT(-DISCR) / (2.0*A)
RETURN

C ZERO DISCRIMINANT, ONE REAL ROOT
120 X1 = -B / (2.0*A)
X2 = X1
RETURN

C +VE DISCRIMINANT, TWO REAL ROOTS
130 X1 = (-B + SQRT(DISCR)) / (2.0*A)
X2 = (-B - SQRT(DISCR)) / (2.0*A)
RETURN
C
C NEXT STORE SUBROUTINE ON DISK USING DUP
END
// DUP
*DELETE QUADR
*STORE WS UA QUADR
// JOB
// FOR
*LIST SOURCE PROGRAM
*IOCS(CARD,1132 PRINTER)
*ONE WORD INTEGERS
C-------------------------------------------------------
C PROCESS DATA CARDS WITH A,B,C
C UNTIL A=0
C-------------------------------------------------------

DATA ICARD,IPRT /2,3/
REAL A,B,C
REAL DISCR,XR1,XR2,VX,VY,FL,FPY

WRITE(IPRT,901)
901 FORMAT(' ------------------------------------------------------')

C READ A B C, IF A=0 THEN EXIT
100 READ(ICARD,801)A,B,C
801 FORMAT(3F8.3)

C EXIT WHEN A IS ZERO
IF (A) 110,9000,110

C PRINT A B C
110 WRITE(IPRT,902)A,B,C
902 FORMAT(' QUADRATIC A=',F8.3,' B=',F8.3,' C=',F8.3)

C COMPUTE AND PRINT THE CRITICAL VALUES
CALL QUADR(A,B,C,DISCR,XR1,XR2,VX,VY,FL,FPY)
WRITE(IPRT,903) DISCR
903 FORMAT(' DISCRIMINANT=',F9.4)
WRITE(IPRT,904) VX,VY
904 FORMAT(' VERTEX X=',F9.4,' Y=',F9.4)
WRITE(IPRT,905) FL
905 FORMAT(' FOCAL LENGTH=',F9.4)
WRITE(IPRT,906) VX,FPY
906 FORMAT(' FOCAL POINT X=',F9.4,' Y='F9.4)

IF (DISCR) 120,130,140

C -VE DISCRIMINANT, TWO COMPLEX ROOTS
120 WRITE(IPRT,913) XR1, XR2
913 FORMAT(' COMPLEX ROOTS =(',F9.4,' +/-',F9.4,'I)')
GO TO 200

C ZERO DISCRIMINANT, ONE REAL ROOT
130 WRITE(IPRT,912) XR1
912 FORMAT(' ROOT X =',F9.4)
GO TO 200

C +VE DISCRIMINANT, TWO REAL ROOTS
140 WRITE(IPRT,911) XR1, XR2
911 FORMAT(' ROOTS X1=',F9.4,' X2=',F9.4)
C --- GO TO 200

C END OF QUAD
200 WRITE(IPRT,901)
GO TO 100

C END OF PROGRAM
C DATA FOLLOWS XEQ CARD
9000 CALL EXIT
END
// XEQ
+001.000+000.000+000.000
+001.000+002.000+003.000
+002.000+002.000+000.000
+002.000+000.000-004.000
+000.500+000.000-004.000
+000.250+002.000-002.000
-004.000+000.000-004.000
+002.730-007.200-003.750
+000.000+000.000+000.000

Sample APL \ 1130 session

The following image shows a simple APL
APL programming language
APL is an interactive array-oriented language and integrated development environment, which is available from a number of commercial and noncommercial vendors and for most computer platforms. It is based on a mathematical notation developed by Kenneth E...

\ 1130 session. This session was performed via the 1130 simulator available from IBM 1130.org



The above session shows a signon, addition of the integers 1 to 100, generation of an addition table for the integers 1..5 and a sign off.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK