Transcript Software

Computer Software
Evolution of Programming
Languages
•
•
•
•
Machine Languages
Assembly Languages
High-Level Languages
Fourth-Generation Languages
Machine Languages
• The native language of the hardware
• Patterns of binary bits
• Machine specific, is non-portable
– is essentially the microcode of the processor
Assembly Languages
• Replace the pattern of binary bits with
– mnemonics for the commands
– variable names for memory locations
• Essentially a one-to-one mapping of the
machine language
• Still machine specific, is non-portable
High-Level Languages
• Represents multiple machine-level
statements with single statements
• Easier to learn and use
• Not machine specific, is portable
An Example
Machine Code
in Hex
27BB0001
23BD8050
23DEFFF0
A61D8018
A77D8010
47E0F411
B75E0000
6B5B4000
27BA0001
A75E0000
23BD8050
47FF0400
23DE0010
6BFA8001
Assembly Code
High-Level Code
ldah
lda
lda
ldq
ldq
mov
stq
jsr
ldah
ldq
lda
clr
lda
ret
main()
{
int a, b, c;
a = 3;
b = 4;
c = a + b;
printf(“\n%d\n”, c);
}
gp, main
gp, main
sp, -16(sp)
r16, 8(gp)
r27, printf
7, r17
r26, (sp)
r26, printf
gp, main
r26, (sp)
gp, main
r0
sp, 16(sp)
r26
Move from Language to
Language
• Computers only understand machine
language.
• Use an ASSEMBLER to convert a program
written in assembly language to machine
language.
• Use a COMPILER to convert a program
written in a high-level language to machine
language.
Executable Code
• Program code which is in machine language
and can be run (executed) by the computer
• Is hardware dependent you can’t run it on
just any machine
• On PCs PC usually have an EXE or a COM
extension
Object Code
• Program code which is in machine language
but which is not ready to be run (i.e. it is a
partial program).
• Is hardware dependent.
• On PCs usually has an OBJ extension.
• Not commonly used by end-users.
Source Code
• Program code which is written in a highlevel language.
• Cannot be run by the computer.
• Is usually a text file.
• File name extension usually reflects the
high-level language
– BASIC - BAS extension
– Pascal - PAS extension
Compiler & Files
Source
Error Messages
Compiler
Code
Program Listing
Object Code
Object Code
Library
Linker
Executable
Code
Dynamic Link Libraries
• Some Window programs use “run-time”
linking and and require the presence of
dynamic link library files which have a
DLL extension.
• DLL files ideally contain code which would
be used my a number of programs.
Object Libraries & DLLs
• Both contain “commonly” used code.
• With object libraries all the code is included
in the executable file at compile time so:
– programming effort is saved
– no space saving is realized, executables which
use common code have their own copy of the
library code
Object Libraries & DLLs
• With DLLs the code is “fetched” from the
DLL file at “run time” so:
– programming effort is saved
– space savings “may” be realized
– the more executables that use the library code
the greater the savings
– typically only a small part of the library code is
used
Common HLLs
•
•
•
•
•
•
FORTRAN
COBOL
BASIC
Pascal
C
C++
•
•
•
•
•
PL/1
Ada
JAVA
LISP
Prolog
Fourth Generation Languages
• First three generations focused on
describing “HOW TO DO” a task.
• 4GLs focus on describing “WHAT TO
ACCOMPLISH”
• The fourth generation language compiler
must be able to translate the “what to
accomplish” description into a machine
level “how to” set of instructions.
Categories of 4GLs
•
•
•
•
•
•
•
Query languages
Report generators
Graphics languages
Application generators
Very high-level programming languages
Application software packages
Microcomputer tools
Categories of Software
• System Software
– Operating Systems (OS)
– Language Translators
– Utility Programs
• Application Software
Operating Systems
• It is the job of the operating system to
manage the computers resources and control
the execution of programs.
• Computer resources include
– memory
– device drivers for peripheral devices
• The OS is the interface between the
hardware and the user/application program.
Layers of interaction
Users
Application Software
System Software
Hardware
Operating Systems
• OSs run the full spectrum from
– single program-single user, to
– multitasking, multi-user, with virtual memory
• The OS decides which program runs and for
how long.
• The OS improves throughput by skipping
over processes that are waiting for I/O.
Common Operating Systems
•
•
•
•
•
•
CP/M
DOS
Windows 3.1
Windows 95
Windows NT
OS/2
•
•
•
•
•
•
System 7
Mac OSX
Linux
UNIX
VMS
VM/CMS
More RAM needed!
• Newer OSs extend the capabilities of
desktop computers but require more RAM
• Windows 3.0
- 1MB (std),2MB (real)
• Windows 95
- 8MB recommended
• Windows NT 4.2 - 16MB (32 rec.)
• Windows 2000 - 64MB min.
• Windows XP
- 128MB rec.(64MB min)
• Windows Vista - 1GB rec. (512MB min)