OOPS - Minimal Hardware Programming, Study notes of Object Oriented Programming

In this document topics covered which are History of Programming Languages, Minimal Hardware Programming, Pseudo codes, Short Code, The IBM 704 and FORTRAN, FORTRAN.

Typology: Study notes

2010/2011

Uploaded on 09/05/2011

vrunda
vrunda 🇮🇳

4.1

(21)

76 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
History of Programming Languages
Plankalkül – 1945
- Never implemented
- Develped by Zuse (German Scientist)
- Plankalkül means program calculus
- Simplest data type (single bit)
- Includes arrays and records
Minimal Hardware Programming: Pseudo codes
The machines of that time were difficult to program because of the lack of supporting
software. There were no high-level programming languages or even assembly languages,
so programming was done in machine code, which is both tedious and error-prone.
A more serious problem is absolute addressing, which makes programs very difficult to
modify. For example, suppose we have a machine language program that is stored in
memory. Many of the instructions in such a program refer to other locations within the
program, usually to reference data or to indicate the targets of branch instructions.
Inserting an instruction at any position in the program other than at the end invalidates
the correctness of all instructions that refer to addresses beyond the insertion point,
because those addresses must be increased to make room for the new instruction.
These are standard problems with all machine languages and were the primary
motivation for inventing assemblers and assembly languages.
Short Code
The first of these new languages, named Short Code, was developed by John Mauchly in
1949 for te BINAC computer. Short Code was later transferred to a UNIVAC I
The UNIVAC I had words that consisted of 72 bits, grouped as 12 six bit bytes. Some of
the codes were
01 - 06 abs values 1n (n+2)nd power
02 ) 07 + 2n (n+2)nd root
03 = 08 pause 4n if <= n
04 / 09 ( 58 print and tab
Variables, or memory locations, were named with byte-pair codes, as were locations to be
used as constants. For example, x0 and y0 could be variables. The statement
X0 = SQRT(ABS(Y0))
would be coded in a word as 00 X0 03 20 06 Y0. The initial 00 was used as padding to
fill the word.
Short Code was not translated to machine code.
Speedcoding
Speedcoding system developed by John Backus for the IBM 701 is an example of such a
system(Backus, 1954). The Speedcoding interpreter effectively converted the 701 to a
virtual three-address floating-point calculator. The system included pesudoinstruction for
the four arithmetic operations on floating-point data, as well as operations such as square
pf3
pf4

Partial preview of the text

Download OOPS - Minimal Hardware Programming and more Study notes Object Oriented Programming in PDF only on Docsity!

History of Programming Languages Plankalkül – 1945

  • Never implemented
  • Develped by Zuse (German Scientist)
  • Plankalkül means program calculus
  • Simplest data type (single bit)
  • Includes arrays and records

Minimal Hardware Programming: Pseudo codes

The machines of that time were difficult to program because of the lack of supporting software. There were no high-level programming languages or even assembly languages, so programming was done in machine code, which is both tedious and error-prone. A more serious problem is absolute addressing, which makes programs very difficult to modify. For example, suppose we have a machine language program that is stored in memory. Many of the instructions in such a program refer to other locations within the program, usually to reference data or to indicate the targets of branch instructions. Inserting an instruction at any position in the program other than at the end invalidates the correctness of all instructions that refer to addresses beyond the insertion point, because those addresses must be increased to make room for the new instruction. These are standard problems with all machine languages and were the primary motivation for inventing assemblers and assembly languages.

Short Code The first of these new languages, named Short Code, was developed by John Mauchly in 1949 for te BINAC computer. Short Code was later transferred to a UNIVAC I The UNIVAC I had words that consisted of 72 bits, grouped as 12 six bit bytes. Some of the codes were 01 - 06 abs values 1n (n+2)nd power 02 ) 07 + 2n (n+2)nd root 03 = 08 pause 4n if <= n 04 / 09 ( 58 print and tab

Variables, or memory locations, were named with byte-pair codes, as were locations to be used as constants. For example, x0 and y0 could be variables. The statement

X0 = SQRT(ABS(Y0))

would be coded in a word as 00 X0 03 20 06 Y0. The initial 00 was used as padding to fill the word. Short Code was not translated to machine code.

Speedcoding Speedcoding system developed by John Backus for the IBM 701 is an example of such a system(Backus, 1954). The Speedcoding interpreter effectively converted the 701 to a virtual three-address floating-point calculator. The system included pesudoinstruction for the four arithmetic operations on floating-point data, as well as operations such as square

root, sine, arc tangent, exponent, and logarithm. Conditional and unconditional branches

and input/output conversions were also part of the virtual architecture. Add instruction took 4.2 milliseconds to execute. On the other hand, Speedcoding included the novel facility of automatically incrementing address registers. Backus claimed that problems that could take tow weeks to program in machine code could be programmed in a few hours using Speedcoding.

The IBM 704 and FORTRAN

Historical Background One of the primary reasons why interpretive systems were tolerated from the late 1940s in the mid-1950s was the lack of floating-point hardware in the available computers. All floating-point operations had to be simulated in software, a very time-consuming process. The announcement of the IBM 704 system, with both indexing and floating- point instructions in hardware, heralded the end of the interpretive era, at least for scientific computation.

Design Process By November 1954, John Backus and his group at IBM had produced the report entitled “The IBM Mathematical FORmula TRANslating System: FORTRAN” (IBM, 1954). This document described the first version of FORTRAN which we refer to as FORTRAN 0, prior to its implementation.

FORTRAN I Overview FORTRAN 0 wsa modified during the implementation period, which began in January 1955 and continued until the release of the compiler in April 1957. The implemented language, which we call FORTRAN I. FORTRAN I include input/ouput formatting, variable names of up to six characters(it had been just two in FORTRAN 0), user-defined subroutines, although they could not be separately compiled, the IF selection statement, and the DO loop statement. The 704 character set did not include characters such as >, so these relational operators had to be dropped. The original logical IF was replaced with the arithmetic selection which has the form IF (arithmetic expression) N1, N2, N Where N1,N2 and N3 are statement labels. If the value of the expression is negative, the branch is to N1; if zero, it is to N2,; if greater than zero, to N3. this statement is still part of FORTRAN. There were no data-typing statements in the FORTRAN I language. Variables whose names began with I, J, K, L, M and N were implicitly integer type, and all others were implicitly floating-point.

FORTRAN II Overview The FORTRAN II compiler was distributed in the spring of 1958, If fixed many of the bugs in the FORTRAN I compilation system and added some significant features to the language, the most important being the independent compilation subroutines.

FORTRAN IV, FORTRAN 77 and FORTRAN 90

FLOW-MATIC

In December 1953, Grace Hopper at Remington-Rand UNIVAC produced a proposal that was indeed prophetic. IT suggested that “mathematical programs should be written in mathematical notation, data processing programs should be written in English statements” COBOL Design Process The first formal meeting on the subject of a common language for business application, which was sponsored by the Department of Defense, was held at the Pentagon on May 28 and 29, 1959. The consensus of the group was that the language, then named CBl (for Common Business Language) should have the following general characteristics. Most agreed that it should use English as much as possible, although a few argued for a more mathematical notation. The language must be easy to use, even at the expense of being less powerful. The language specifications for COBOL 60 were published by the Government Printing Office in April 1960.