A B rie f In tro d u c tio n to th e H is to ry
- f C
- m
p u tin g
- 3
A B rie f In tro d u c tio n to th e H is to ry o f - - PowerPoint PPT Presentation
A B rie f In tro d u c tio n to th e H is to ry o f C o m p u tin g - 3 ANU Faculty of Engineering and IT Department of Computer Science COMP1200 Perspectives on Computing 2002-05 Chris Johnson In tro to
Intro to history of computing (3):Moore's Law and The Programmers 2
rd and 4 th generations
Intro to history of computing (3):Moore's Law and The Programmers 3
Intro to history of computing (3):Moore's Law and The Programmers 4
1 9 7 2 7 8 8 3 8 6 9 0
1 2,500 2 30,000 3 100,000 4 300,000 1990 1,000,000 data from Intel
Intro to history of computing (3):Moore's Law and The Programmers 5
data from Intel 1,000,000 2500 <- - - - Linear scale - - - - -> log scale
1 2,500 2 30,000 3 100,000 4 300,000 1990 1,000,000
Intro to history of computing (3):Moore's Law and The Programmers 6
Intro to history of computing (3):Moore's Law and The Programmers 7
Secondary storage use for online file storage I/O controllers Virtual memory Online file storage fast cache memory ALU registers pipelines
rd &
th g
Intro to history of computing (3):Moore's Law and The Programmers 8
Intro to history of computing (3):Moore's Law and The Programmers 9
Intro to history of computing (3):Moore's Law and The Programmers 10
Intro to history of computing (3):Moore's Law and The Programmers 11
Intro to history of computing (3):Moore's Law and The Programmers 12
Intro to history of computing (3):Moore's Law and The Programmers 13
Intro to history of computing (3):Moore's Law and The Programmers 14
Intro to history of computing (3):Moore's Law and The Programmers 15
[from Brookshear Figure 6.1]
Intro to history of computing (3):Moore's Law and The Programmers 16
1.
2.
3.
Intro to history of computing (3):Moore's Law and The Programmers 17
2.
3.
4.
5.
6.
7.
2.
3.
4.
5.
many high level languages of different types
Intro to history of computing (3):Moore's Law and The Programmers 18
[Brookshear Figure 6.2] plus Simula 67 & Eiffel
Simula-67 Eiffel
Intro to history of computing (3):Moore's Law and The Programmers 19
[from Eric Levenez] LISP ALGOL FORTRAN COBOL C APL Ada Pascal Modula
Intro to history of computing (3):Moore's Law and The Programmers 20
definition: naming and types storage life structure manipulation (arithmetic)
program modularity program execution control
jumps, conditions, loops, subroutine calls
abstraction
subroutines nesting classes & inheritance
Intro to history of computing (3):Moore's Law and The Programmers 21
Intro to history of computing (3):Moore's Law and The Programmers 22
class BDM creation doit -- read a given number of ints, find min and max feature doit is local count, max, min: INTEGER do io.read_integer; count := io.last_integer
io.read_integer; max := io.last_integer; min := max from i:=1 until i=count loop io.read_integer; if max < io.last_integer then max := io.last_integer end if min > io.last_integer then min := io.last_integer end i:=i+1 end io.put_string("The largest number was: "); io.put_integer(max) io.put_string(" and the smallest was: "); io.put_integer(min)
data control: the scope of count, max, min data control: the scope of i
Intro to history of computing (3):Moore's Law and The Programmers 23
add two numbers - see Brookshear p. 226 156C 166D 5056 306E C000 Extending this "language" from a sequence of numbers to include comments makes life easier for the original programmer - and for the next programmer to read it. ;add Price (6C) and ShippingCost (6D), Total to 6E 156C ;load 6C to R5 166D ;load 6D to R6 5056 ;add them, result to R0 306E ;store R0 to 6E C000 ;stop here
Intro to history of computing (3):Moore's Law and The Programmers 24
; data storage address definitions (these generate no instructions) .DEF Price 6C .DEF Shipping 6D .DEF TotalCost 6E ; The actual instructions of the program ; correspond exactly to the machine instructions above ; Add Price and Shipping to calculate TotalCost LD R5, Price LD R6, Shipping ADD R0, R5, R6 ST R0, TotalCost HLT [adapted from Brookshear p.226]
Intro to history of computing (3):Moore's Law and The Programmers 25
; pricing variables
Price: .SZ 1 Shipping: .SZ 1 TotalCost: .SZ 1 ; if Shipping cost is greater than zero then ; add Price and Shipping to calculate TotalCost LD R6, Shipping JZ R6, NoAdd LD R5, Price ADD R0, R5, R6 ST R0, TotalCost JMP Next NoAdd: LD R6, Price ; else TotalCost equals Price ST R6, TotalCost Next: HLT
Flow control is by test and jumps. A loop is a jump back to an earlier point in the program
Intro to history of computing (3):Moore's Law and The Programmers 26
; pricing variables Price: .SZ 1 Shipping: .SZ 1 TotalCost: .SZ 1 ; if Shipping cost is greater than zero then ; add Price and Shipping to calculate TotalCost LD R6, Shipping JZ R6, NoAdd LD R5, Price control flow ADD R0, R5, R6 ST R0, TotalCost JMP Next NoAdd: LD R6, Price ; else TotalCost equals Price ST R6, TotalCost Next: HLT
Assembly language provides no data control. These labels are all just addresses, data and program instructions mixed together
Intro to history of computing (3):Moore's Law and The Programmers 27
class BDM creation doit -- read a given number of ints, find min and max feature doit is local count, max, min: INTEGER do io.read_integer; count := io.last_integer
io.read_integer; max := io.last_integer; min := max from i:=1 until i=count loop io.read_integer; if max < io.last_integer then max := io.last_integer end if min > io.last_integer then min := io.last_integer end i:=i+1 end io.put_string("The largest number was: "); io.put_integer(max) io.put_string(" and the smallest was: "); io.put_integer(min)
Intro to history of computing (3):Moore's Law and The Programmers 28