Examples of 22 Corporate Programming Languages,

from the 1950s to Today

… and computing before that

 

by Paul H. Harkins

 

I have been paid to program in many corporate programming languages over the last 45 years as a successful corporate programmer. 

 

These 22 source program examples are of the same routine, and illustrate how corporate programming was accomplished from the very dawn of electronic corporate computing in the early 1950s of the three-ton computers like the IBM 650 until today. These 22 source program examples illustrate how corporate programming languages have evolved in form while retaining essentially the same function.

(all in the time of in my university and working career)

 

My website www.harkinsaudit.com article “How to Dramatically Increase Your Programming Capability, Productivity, and Value…in any Corporate Programming Language” illustrates how you can quickly and easily dramatically increase your corporate programming capability, productivity, and value in virtually every programming language…right now.

 

My first computer program was written in 1960 while I was a student at Drexel Institute of Technology, now Drexel University, using the very first computer at Drexel in the first computer course at Drexel on the IBM 650 Computer in the SOAP II  Symbolic Optimizing Assembler Programming  Language. We all had slide rules on our hips for personal engineering computing, as hand-held electronic calculators had not yet been invented.

 

My Masters Thesis at Drexel University in 1969 “An Illustrative Comparison of the Five IBM DOS Programming Languages: Assembler, COBOL, FORTRAN, PL/I, and RPG” was written when I was a young IBM Systems Engineer. I was paid to program in those five corporate programming languages, and other languages for the IBM System/360 and to teach many customer programmers how to program. DOS was a major operating system for the IBM System/360 (20 years before Microsoft DOS).

 

After 45 years of being a highly paid successful corporate programmer, and at the age of 67, I am still an active corporate programming consultant, the owner of a software development company, the inventor of a current software U.S.Patent No. 6,775,827, and an IBM Business Partner for arguably the most powerful corporate computer of today, the IBM System i computer.

 

The astute reader may realize the similarity of the current programming languages Java, C++ and free format RPG to the IBM PL/I programming language of the 1960s.

 

Corporate computers are today billions of times faster and more powerful that the IBM 650 corporate computer of my student days at Drexel. The really astute reader may realize that it is not the form of the current computing languages that is important, but that it is how the inventive programmer uses them to solve corporate business issues.

 

Note that the corporate programming language RPG has thrived for more that 45 years, and has morphed into a very powerful and productive free format current programming language, looking more and more like Java and C++.

IBM engineers took pains to make the 1401 easy to program by those trained to work with punched card equipment. A simple language called "Report Program Generator" (RPG) made it easy to automate routine processes, and to print results on standard tabular forms.

Source: http://www.cs.union.edu/~hemmendd/Courses/cs40/History/digcomphist.html

 

Multiple programming languages are used together to Web enable GUI applications on the IBM System i computer, including JavaScript, HTML in a Web setting insert to a Java Server Page (JSP). These JavaScript, HTML, and Web settings are automatically inserted into the IBM Display File Source program enable GUI ONMOUSEOVER (mouse over) and ONCLICK (click to display a calendar) capability.  The application program is written in RPG.

 

I wired the IBM 602A Calculating Punch in my early years as a Systems Engineer at IBM starting in 1961. The 12 electromechanical counters of 10 digits each allowed multiplication and division results to be punched into a punched 80 column card. The 12 electromechanical counters for each of the 12 programmable steps (through wires in a control panel) could be viewed and  single-cycled by a “clicker” and viewed by raising the top cover of the 602A. This was my first experience with auditing results inside a calculator.

The ENIAC computer invented by Eckert and Mauchly came after Eckert’s work with the IBM 601 Calculating Punch in 1933. 

 

http://www.columbia.edu/acis/history/601.html

The IBM 601 Multiplying Punch, introduced in 1931. It read two factors up to eight decimal digits in length from a card and punched their product onto a blank field of the same card. It could subtract and add as well as multiply. It had no printing capacity, so was generally used as an offline assistant for a tabulator or accounting machine [4]. The 601 that was delivered to Eckert's lab in 1933 was a special model "capable of doing direct interpolation, a very unusual feature, especially designed for Eckert by one of IBM's top engineers at Endicott [NY]" [9]. Eckert went a step further by connecting the 601 to a Type 285 Tabulator and a Type 016 Duplicating Punch through a calculation control switch of his own design, forming the first machine to perform complex scientific computations automatically.

 

 

 

The Example program routine or Function

 

The multiply instruction of 22 programming languages is shown below to illustrate how a calculator multiply of two numbers might be accomplished in these languages. These are illustrative examples only and are based on how we remember the languages, as some languages were utilized in the 1950s (SOAP II), and early 1960s (SPS and Autocoder).

The Multiply statement line in each illustration is underlined.

 

The programming languages are: Basic, Visual Basic, C, C++, C#, COBOL, APL, Assembler, Fortran, Java, Smalltalk, JavaScript, Lotus Script, RPGIII, RPGIV, PL/I, Pascal, SQL, Oracle, Autocoder, Symbolic Programming System (SPS), Symbolic Optimizing Assembler Programming (SOAP II).

 

Much additional information about almost all of the illustrated  programming languages is available at www.google.com  To find detailed information about Pascal, use the search Pascal Programming; for COBOL use the search COBOL Programming, for Java, use Java Programming, for C++, use C++ Programming, etc.

 

The original published reference manuals for almost all of these programming languages are available on the Internet. These manuals were scanned by people interested in preserving the programming reference manuals from the earliest days of stored-program computing.

 

Most often, only the instructions relating to the multiply instruction are illustrated, not the complete source program.

 

The multiply example is a payroll calculation of rate times hours to compute gross.

RATE is a 5 position field with 2 decimals, with a value of 41.25.

HOURS is a 5 position field with 2 decimals, with a value of 39.75.

GROSS is a 5 position field with 2 decimals.

------------------------------------------------------------------------------------------------------------

On a calculator:

Press the Clear key

Enter 41.25 (HOURS)

Press the X (times) key

Enter 39.75 (RATE)

Press the = (equals) key

The displayed product (GROSS) is 1639.6875

Round GROSS to 1639.69  (2 decimals)

 

 

RPGIII (IBM iSeries computer)

 

This is an IBM RPGIII (Report Program Generator) source program   

 

0001.00      H                                                                 

0002.00       * RPGIII MULTIPLY WITH HALF-ADJUST                               

0003.00      C                                           Z-ADD41.25        HOURS   52                    

0004.00      C                                           Z-ADD39.75        RATE      52                   

0005.00      C                     HOURS        MULT  RATE      GROSS    72H                   

0006.00      C                                           MOVEL'1'           *INLR                        

 

The Multiply statement line 5.00 is underlined. The H means half-adjust GROSS from 1639.6875 to 2 decimals or 1639.69. This is a complete RPGIII source program.

 

 

The computer computes GROSS as each statement is executed as in the following RTPA program audit:

 

Program:           RPGIII Multiply                      

 Job: 025165        User/Prof:           PHH             

 CMPLLST#  Source Statements and Variable Values         

        0003 C                                               Z-ADD41.25        HOURS   52    

                                                                                                     41.25         

        0004 C                                               Z-ADD39.75        RATE      52    

                                                                                                 39.75          

        0005 C                        HOURS         MULT RATE       GROSS    72H    

                                                41.25                       39.75       1639.69         

        0006 C                                               MOVEL'1'            *INLR         

                                                                                                1             

 

 

RPGIV (IBM iSeries computer)

 

This is an IBM RPGIV (Report Program Generator) fixed-form source program   

 

0001.00 h                                                      

0002.00   * RPGIV multiply with half-adjust                     

0003.00 d hours           S              5  2                  

0004.00 d rate              S              5  2                  

0005.00 d gross            S              7  2                  

0006.00 c                   eval        hours = 41.25            

0007.00 c                   eval        rate = 39.75             

0008.00 c                   eval(h)   gross = hours * rate     

0009.00 c                   eval       *inlr = '1'              

 

The multiply statement line is an eval (evaluate) operation code with the multiply an *, and is underlined. The (h) means half-adjust gross from 1639.6875 to 2 decimals or 1639.69. This is a complete RPGIV source program.

The computer computes gross as each statement is executed as in the following RTPA program audit:

Job: 025217        User/Prof:     PHH   PHH                    

 CMPLLST#  SOU

Program: TESTMULT  RPGIV Multiply                              

RCE STATEMENTS AND VARIABLE VALUES                

     6c                   eval      hours = 41.25               

                                         41.25                       

     7c                   eval      rate = 39.75                

                                     39.75                         

     8c                   eval(h)   gross = hours * rate        

                                      1639.69    41.25  39.75        

     9c                   eval      *inlr = "1"                 

                                         1                            

                                                                

------------------------------------------------------------------------------------------------------------

RPGIV (IBM iSeries computer)

 

This is an IBM RPGIV (Report Program Generator) free-form source program   

 

0001.00 h                                                       

0002.00   * RPGIV multiply with half-adjust in free-form         

0003.00 d hours           S              5  2                   

0004.00 d rate              S              5  2                   

0005.00 d gross            S              7  2                   

0006.00  /free                                                  

0007.00   eval      hours = 41.25;                               

0008.00    eval       rate = 39.75;                              

0009.00     eval(h)   gross = hours * rate;                     

0010.00      eval        *inlr = '1';                             

0011.00  /end-free                                               

 

The multiply statement line is an eval (evaluate) operation code with the multiply an *, and is underlined. The (h) means half-adjust gross from 1639.6875 to 2 decimals or 1639.69. This is a complete RPGIV source program.

 

The computer computes gross as each statement is executed as in the following RTPA program audit:

Program: TESTMULTF RPGIV Multiply Free-form       

 Job: 025217        User/Prof:     PHH   PHH       

 CMPLLST#  SOURCE STATEMENTS AND VARIABLE VALUES   

     7  eval      hours = 41.25;                   

                      41.25                            

     8   eval       rate = 39.75;                   

                    39.75                            

     9    eval(h)   gross = hours * rate;          

                     1639.69    41.25  39.75           

    10     eval      *inlr = "1";                  

                           1

 

---------------------------------------------------------------------------------------------------------------------------------


   
 Java (IBM iSeries computer)

Contributed by: Jim Mason

ebt-now QuickWebServices

jemason@ebt-now.com

 

/**

 *         In Java, decimals are represented by the class java.math.BigDecimal

 *  While math operations using primitive data types (int, long, float, double)

 *                     are easier and faster (the example below is 500 times faster as doubles!),

 *         BigDecimal objects allow the same precision and scale

 *  you see in other languages (typically for applications such as accounting)

 *

 * hours: 41.25 x rate: 39.75 = gross: 1639.69

 *

*/

            BigDecimal  hours         = new BigDecimal("41.25");

            BigDecimal  rate           = new BigDecimal("39.75");

            BigDecimal gross = hours.multiply(rate).setScale(2, BigDecimal.ROUND_HALF_UP);

            System.out.println("hours: " + hours + " x rate: " + rate +

                        " = gross: " + gross);

 

/**

 * using primitive double instead of decimals is MUCH easier... and faster in Java

 *         notice multiply for primitives = '*'

 *

 * hours: 41.25 x rate: 39.75 = gross: 1639.6875

 *

 */

            double hours = 41.25; 

            double rate = 39.75;

            double gross = hours * rate;

            System.out.println("hours: " + hours + " x rate: " + rate +

                        " = gross: " + gross);

           

 

/**

 * you can always create a decimal with the proper format from the primitive result

 * hours: 41.25 x rate: 39.75 = gross: 1639.69

 */

            double hours = 41.25; 

            double rate = 39.75;

            double gross = hours * rate;

              BigDecimal grossd = new BigDecimal(gross).setScale(2,      BigDecimal.ROUND_HALF_UP);

            System.out.println("hours: " + hours + " x rate: " + rate +

                        " = gross: " + grossd);

 

---------------------------------------------------------------------------------------------------------------------

Smalltalk (Cross-platform)

Contributed by: Jim Mason

ebt-now QuickWebServices

jemason@ebt-now.com

 

Smalltalk is by far the most object-oriented commercial programming language.

It is nowhere near as popular today as Java but you can do interesting things...

Notice the literal numbers UNDERSTAND messages like asDecimal.

There are NO primitives! Everything can learn new behavior!

 

            hours := 41.25 asDecimal.

            rate := 39.75 asDecimal.

            gross := hours * rate rounded Up.

 

            simple, elegant and close to English..

 

 

JavaScript

 

             <SCRIPT LANGUAGE=”javascript”>

  

              var hours =  41.25                 

              var rate = 39.75

              var gross = hours * rate

              </SCRIPT>

 

 

JavaScript and HTML in a GUI IBM WebFaced screen

 

Multiple programming languages are used together to Web enable GUI applications on the IBM System i computer, including JavaScript, HTML in this Web setting insert to a Java Server Page (JSP). These JavaScript, HTML, and Web settings are automatically inserted into the IBM Display File Source program enable GUI ONMOUSEOVER (mouse over) and ONCLICK (click to display a calendar) capability. The application program is written in RPG.

 

 

                           12  2'Expected Ship Date'                 

      EXPMDY         6Y 0B 12 21COLOR(WHT)                           

7 FLD  ONMOUSEOVER="this.style.background='yellow';" ONMOUSEOUT="th+ 

+is.style.background='#fcfecd';" style="width: auto;"                

8 FLD  <A href="#" class="wf_default wf_field" style="cursor:hand" + 

+onClick="JavaScript:showCalendar(&{EXPMDY}, 'm/d/y');"><img +       

+NAME="search" border="0" alt="Click here for Calendar" src="+       

+<%=request.getContextPath()%>/webfacing/styles/style_wdsccal+       

+/cal.gif"></A>                                                      

                                EDTWRD('  /  /  ')                    

------------------------------------------------------------------------------------------------------------        

LotusScript (IBM Corporation)

 

             Dim hours As Currency, rate As Currency

  

              hours =  41.25                       

              rate = 39.75

              gross = hours * rate

             

------------------------------------------------------------------------------------------------------------        

APL\360 A Programming Language (IBM System/360)

 

APL input and output was normally accomplished with the IBM 1050 terminal typewriter, connected to an IBM/360 computer. The symbol for assigning a value to a variable is the left-pointing arrow. A variable must always have a name and a value. APL uses a special keyboard for the many APL special characters. The carriage-return key transmits your keyed information to the System/360. The multiplication operator is x, and the exponentiation operator is *.

 

              HOURS<-41.25                   

              RATE<-39.75

              GROSS<-HOURSxRATE          

 

           

------------------------------------------------------------------------------------------------------------        

 

Visual Basic .NET (Any computer with the .NET Framework installed)

Contributed by: Jason Honrath

Jason@jayhonrath.com
www.jayhonrath.com

 

'The .NET Framework Math Methods are part of the

'System.Math class.

'

'Like all of the .Net framework classes, this class is available

'to any language that is .NET aware.

'

'That means that C#, Visual Basic.NET, ASNA Visual RPG (AVR), Fujitsu

'NetCOBOL, etc all can use the same exact class to do the work.

 

Dim Hours As Double

Dim Rate As Double

Dim Gross As Double

Hours = 41.25

Rate = 39.75
Gross = System.Math.Round(Hours * Rate, 2)

------------------------------------------------------------------------------------------------------------        

Basic  (Any computer with the Microsoft QBASIC Compiler installed)

 

CLS

DIM Hours AS DOUBLE

DIM Rate AS DOUBLE

DIM Gross AS DOUBLE

Hours = 41.25

Rate = 39.75
Gross = Hours * Rate

END

------------------------------------------------------------------------------------------------------------

C  (Any computer with the C compiler installed)

Contributed by: Gordie Harkins

 

#include <stdio.h>        // for printf

 

int main()

{

            double hours = 41.25;

            double rate = 39.75;

            double gross = hours*rate;

            printf("hours:  %.2f x rate: %.2f = gross: %.2f \n",

                        hours, rate, gross);

            return 0;

}

------------------------------------------------------------------------------------------------------------        

C ++ (Any computer with the C++ compiler installed)

Contributed by: Gordie Harkins

 

#include <iostream>                 // for cout – the print stmt

#include <iomanip>                  // sor setw – to set the width on output

 

using namespace std;                // namespaces are used to avoid different

                                                            // developers using the same function name

                                                            // otherwise have to prefix stmts with std::

 

int main()

{

            double hours = 41.25;

            double rate = 39.75;

            double gross = hours*rate;

 

            //std::cout<<"hours: "<<std::setw(2)<< hours<<" x rate: "

            //                                  << rate<<" = gross: "<< gross<<std::endl;

 

            cout<<"hours: "<<setw(2)<< hours<<" x rate: "

                        << rate<<" = gross: "<< gross<<endl;

            return 0;

}

 

C #  (Any computer with the C# (Microsoft Sharp) compiler installed)

Contributed by: Gordie Harkins

 

using System;    // uses the System namespace -- where to look for objects not defined here

                                    // or could use line commented

 

namespace cSharpExample

{

                        class rateCalculation

            {

                        static void Main(string[] args)

                        {

                                    double hours = 41.25;

                                    double rate = 39.75;

                                    double gross = hours*rate;

 

                                    //System.Console.WriteLine("hours: "+System.Math.Round(hours, 2)+

                                    //          "x rate: " + System.Math.Round(rate, 2)+

                                    //          " = gross: "+System.Math.Round(gross, 2));

 

                                                Console.WriteLine("hours: "+Math.Round(hours, 2)+

                                                                "x rate: " + Math.Round(rate, 2)+

                                                                " = gross: "+Math.Round(gross, 2));

                                }

                }

}

 

------------------------------------------------------------------------------------------------------------

 

COBOL Common Business Oriented Language

(IBM System/360 Computer)

 

 004070 DATA DIVISION.

 004080 WORKING STORAGE SECTION.

 004090              77 HOURS  PICTURE  S99999V99 USAGE COMPUTATIONAL-3 VALUE ZERO.

 004100              77 RATE     PICTURE  S99999V99 USAGE COMPUTATIONAL-3 VALUE ZERO.

 004200              77 GROSS  PICTURE  S9999999V99 USAGE COMPUTATIONAL-3 VALUE ZERO.

 

 010010 PROCEDURE DIVISION.

 012000    MOVE 41.25 TO HOURS.

 012100    MOVE 39.75 TO RATE.

 012200    MULTIPLY HOURS BY RATE GIVING GROSS ROUNDED.

 

 

 

Assembler  Language (IBM System/360 Computer)

 

002000 HOURS        DC    PL3’0’

002100 RATE           DC    PL3’0’

002200 GROSS         DC    PL4’0’

002300 PRODUCT   DC    PL8’0’

 

002500                      ZAP    HOURS,=P’04125’  

002600                      ZAP    RATE,=P’03975’  

002700                      ZAP    PRODUCT,HOURS

002800                      MP      PRODUCT,RATE  

002900                      AP       PRODUCT,=P’50’

003000                      MVN   PRODUCT+6(1),PRODUCT+7

003100                      ZAP     GROSS,PRODUCT+3(4)

 

The Assembler compiled machine (executable) language was listed on the Assembler compile listing, so the programmer could “Patch or REP (replace the machine instructions) ” the object deck of punched cards to make coding changes without having to change the source program and having to recompile the program.

 

LOC       OBJECT CODE   ADDR1 ADDR2     STMT      SOURCE STATEMENT

003566   F822  2418  2950  0342C   03952           253                     ZAP    HOURS,=P’04125’  

00356C  F822  241B  2953  03430   03955           254                     ZAP    RATE,=P’03975’  

003572   F872  2422  2418  03424   0342C          255                      ZAP    PRODUCT,HOURS

003578   FC72 2422  241B  03424   03430           256                     MP      PRODUCT,RATE  

00357E  FA71 2422  2956   03424   03958           257                     AP      PRODUCT,=P’50’

003584   D100 2428  2429   0342A  0342B          258                     MVN  PRODUCT+6(1),PRODUCT+7

00358A  F833 241E  2425   033E9   03427           259                    ZAP    GROSS,PRODUCT+3(4)

 

The illustrated assembler instructions are all six bytes long (decimal arithmetic), with the first byte being the machine instruction or operation code in hexidecimal (base 16). Machine Operation code FC is Multiply Packed, or Op code MP. Machine Operation code F8 is Zero and Add Packed, or Op code ZAP. The second byte is the length of the two decimal fields being processed, minus one). The Next two bytes are the address of the first operand, and the last two bytes are the address of the second operand. The location is the address in memory of the loaded instruction.

The typical IBM/System/360 mainframe computer had 8 thousand to 64 thousand (not million) bytes of eight-bit core memory, which allowed two digits to be stored in one eight-bit byte.

 

------------------------------------------------------------------------------------------------------------

 

PL/I Programming Language One 

 

(IBM System/360 Computer - DOS Disk Operating System)

 

        DECLARE    

                    HOURS        DECIMAL  FIXED  (5,2)  STATIC  Initial (0),

                    RATE           DECIMAL  FIXED  (5,2)  STATIC  Initial (0),

                    GROSS         DECIMAL  FIXED  (7,2)  STATIC  Initial (0);

 

                    HOURS = 41.25;

                    RATE = 39.75;

                    GROSS =  HOURS * RATE;

                    GROSS = GROSS+.005;            /* HALF ADJUST AMOUNT       */

Also note that the "DECLARE" statements in this example are initialized. This is not necessary, since the initialization was done in the programming body of the program. Normally these items "Hours", "Rate", would be variable and loaded from each individual record. Hours and rates change based on the employee.

 

------------------------------------------------------------------------------------------------------------

 

 PL/I Programming Language One 

 

(IBM System/360 Computer   - OS Operating System)

Contributed by: Palmie Maccari

/*                                                                                                                                                 */

/*         MASTER PAYROLL RECORD LAYOUT                                                                 */

/*                                                                                                                                                 */

DECLARE                

    MRHOURS    DECIMAL FIXED (5,2)                             /*  PAY ROLL HOURS               */

    MRRATE        DECIMAL FIXED (5,2)                            /*  PAY ROLL RATE                  */

    MRGROSS    DECIMAL FIXED (7,2)                             /*  PAY ROLL GROSS               */

/*                                                                                                                                                       */

/*            CALCUALTE  PAYROLL                                                                                                 */

/*                                                                                                                                                      */

START:

    MRHOURS=41.25;                                                             /* SET UP HOUR S                     */

    MRRATE=39.75;                                                                 /* SET UP RATE                         */

    MRGROSS=MRHOURS*RATE;                                     /* CALCULATE GROSS AMT.   */

    MRGROSS=MRGROSS+.005;                                        /* HALF ADJUST AMOUNT       */

END:

-------------------------------------------------------------------------------------------------------------------------------

Note:

The "MR" prefix is to identify which record we are referring (MASTER PAYROLL RECORD). There are a number of different records that will be declared in a normal payroll system programming system. EXAMBLE: you would probably be printing a report as well and you than want to differentiate between the input record, probably coming from a disk record from a print out put record. The print record prefix would probably be "PR" identifying this as a print out put record. The print declare statements than would be prefixed by "PR".

Such as, PRHOURS, PRRATE, PRGROSS, ETC

 

------------------------------------------------------------------------------------------------------------

 

FORTRAN  Formula Translator

(IBM System/360 Computer)

 

                    REAL*4 HOURS

                    REAL*4 RATE

                    REAL*4 GROSS

                    HOURS = 41.25

                    RATE = 39.75

                    GROSS = HOURS * RATE

 

 

 

SQL (Structured Query Language) (IBM iSeries computer)

 

Contributed by: Jerry R. Hollo

 

This SQL example computes GROSS and updates a table (database file) named TESTMULT for name PAUL.

 

UPDATE TESTMULT SET HOURS=41.25,RATE=39.75 WHERE NAME = ‘PAUL’

1 rows updated in TESTMULT in Z$AUDIT.                                                      

UPDATE TESTMULT SET GROSS=DECIMAL(ROUND(HOURS * RATE,2),9,2) WHERE NAME='PAUL'   
1 rows updated in TESTMULT in Z$AUDIT.                                
SELECT NAME,HOURS,RATE,GROSS FROM TESTMULT WHERE NAME = 'PAUL'        
SELECT statement run complete.       

....+....1....+....2....+....3....+....4         
NAME         HOURS     RATE       GROSS          
PAUL               41.25      39.75      1,639.68          
********  End of data  ********                  

 

This SQL example computes and displays GROSS for all rows, without updating table  TESTMULT.

 

SELECT name,hours,rate,decimal (ROUND(hours * rate,2),9,2) AS gross FROM TESTMULT

SELECT statement run complete.       

....+....1....+....2....+....3....+....4         
NAME         HOURS     RATE          GROSS          
PAUL               41.25       39.75        1,639.69          
********  End of data  ********                  

 

------------------------------------------------------------------------------------------------------------

 

Oracle  

 

This Oracle example uses the same table TESTMULT as the above SQL example.

 

This Oracle example computes and displays GROSS for all rows, without updating table TESTMULT.

 

SELECT Name, Hours, Rate, Gross, hours * rate AS gross  ROUND (gross,2) FROM TESTMULT

 

------------------------------------------------------------------------------------------------------------

 

Pascal (Any computer with the Pascal compiler installed)

 

          (* MULTIPLY IN PASCAL *)

           VAR HOURS,

                     RATE,

                     GROSS:    REAL;

                     HOURS = 41.25;

                     RATE = 39.35;

                     GROSS := HOURS * RATE;

 

------------------------------------------------------------------------------------------------------------

 

Autocoder IBM 1401 computer (1960)

 

Source: Reference Manual IBM 1401 Data Processing System A24-1403

 

The IBM 1401 Processing Unit handled variable length alphamerical data and instructions rather than fixed-length words as in the IBM 650 computer. Storage capacity was 1400, 2000, 4,000, 8000, 12,000 or 16,000 alphamerical characters of 8-bit core storage, with six bits for binary-coded decimals (BCD), a check bit, and an eighth bit for field definition (word marks). Instructions varied in length from one to seven characters. Multiplication and division was done by programmed subroutines with multiplication by repetitive addition and division by repetitive subtraction, unless a special hardware multiply-divide hardware feature was installed (Mnemonic M and Op code @ for Multiply and mnemonic D and Op code % for Divide). The 1401 performed arithmetic operations, like add, subtract, multiply and divide by applying the add-to-storage method of operation. The two factors to be combined are added within core storage without the use of special accumulators.

 

The instructions were keypunched into 1401 Autocoder cod