Download presentation
1
Computer Software 1
2
Evolution of Programming Languages
Machine Languages Assembly Languages High-Level Languages Fourth-Generation Languages Fifth-Generation Languages 2
3
Machine Languages The native language of the hardware
Patterns of binary bits Machine specific, is non-portable is essentially the microcode of the processor 3
4
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 4
5
High-Level Languages Represents multiple machine-level statements with single statements Easier to learn and use Not machine specific, is portable 5
6
An Example Machine Code Assembly Code High-Level Code in Hex
27BB ldah gp, main main() 23BD lda gp, main { 23DEFFF lda sp, -16(sp) int a, b, c; A61D ldq r16, 8(gp) a = 3; A77D ldq r27, printf b = 4; 47E0F mov 7, r c = a + b; B75E stq r26, (sp) printf(“\n%d\n”, c); 6B5B jsr r26, printf } 27BA ldah gp, main A75E ldq r26, (sp) 23BD lda gp, main 47FF clr r0 23DE lda sp, 16(sp) 6BFA ret r26 6
7
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. 7
8
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 8
9
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. 9
10
Source Code Program code which is written in a high-level 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 10
11
Compiler & Files Error Messages Program Listing Source Code Compiler
Object Code Executable Code Object Code Library Linker 11
12
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. 12
13
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 13
14
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 14
15
Common HLLs FORTRAN PL/1 COBOL Ada BASIC JAVA Pascal LISP C Prolog C++
15
16
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. 16
17
Categories of 4GLs Query languages Report generators
Graphics languages Application generators Very high-level programming languages Application software packages Microcomputer tools 17
18
Fifth Generation Languages
Similar to 4th generation languages but the programmers use natural language to describe what they want their programs to accomplish.
19
Categories of Software
System Software Operating Systems (OS) Language Translators Utility Programs Application Software 30
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.