260 likes | 576 Views
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
E N D
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 Assembly Code High-Level Code in Hex 27BB0001 ldah gp, main main() 23BD8050 lda gp, main { 23DEFFF0 lda sp, -16(sp) int a, b, c; A61D8018 ldq r16, 8(gp) a = 3; A77D8010 ldq r27, printf b = 4; 47E0F411 mov 7, r17 c = a + b; B75E0000 stq r26, (sp) printf(“\n%d\n”, c); 6B5B4000 jsr r26, printf } 27BA0001 ldah gp, main A75E0000 ldq r26, (sp) 23BD8050 lda gp, main 47FF0400 clr r0 23DE0010 lda sp, 16(sp) 6BFA8001 ret 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 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
Compiler & Files Error Messages Program Listing Source Code Compiler Object Code Executable Code Object Code Library Linker
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)