Question 2. Some High Level Languages (HLL)? 1. COBOL: Common Business Oriented Language - COBOL is an exetensively used HLL and since around 1960 several versions have appeared - The original intention was that COBOL should be capable of being compiled and run on any model of computer - COBOL is now employed for many business data processing applications, and so a brief explaination of its structure follows - A COBOL program consists of 4 divisions: Identifycation division this identifies the prog Enviroment division specifies the computer to be used for compiling and processing Data division specifies the format and relates to these to the names used in the procedure division Procedure division comprises the statements in the source program, this is the main part of a COBOL program 2. BASIC: Beginners ALL purpose Symbolic Instruction Code - BASIC is a straightforward HLL intended for use in a time-sharing environment in this respect it is particularly beneficial in educational institutions - One of the difficulties with BASIC is the welter of dialects currently in use - Essentially BASIC consists of statements made up of verbs & variables. The verbs are similar to those in COBOL but there is a large to them that in effect become the addresses of their locations in the main store - A variable name must be unique and generally consists of one or a few alphabetic characters, purhaps followed by a digit 3. PASCAL: named after the famous 17 th century French mathematician - It was expressly designed as a language to make programming more systematic and discriplired and in these respects lends itself to structured programming - It is however more difficult to learn than are COBOLS BASIC and so is unliked to be accepted as a language for microcomputers are geared to BASIC only Question 3. Operating Systeim? - Concept of OS: An OS consists of a suite of programs, one of which, the master, kernel or exeactive program, remains resident in the main store. This program controls the other OS programs in th suites and between them they controls the application programs Often the operating system includes various application packages among its suit of programs. Ex of such software include: word processing, electronic mail, networking, speadsheet, graphics and file handling - Function of OS Pricrity assignment: Jobs waiting execution are scheduled according to either a predetermined or a dynamic assignments plan Control of multiprogramming Control of accomplish multiprogramming an “executive” or “supervisor” program is employed to control the application programs Communication Control of data transmission between terminals and the computer, and computer to computer Database Control of DBMS Software control Control of assemblers, compilers, utility software, and subroutines so that these are imediately available when required Spooling The control of input/output peripherals in order to achieve their best utilisation Dynamic allocation Of main and backing storage, including virtual storage Operating allocation Via the console printer or VDU Debugging and editing new programs In confunction with the compiler, and passing error msgs to the user Operation log Maintaince of details of all jobs carried out by the computer Application package control Especially with microcomputers, as describe above Chapter 6: TRANSLATORS. Question 1. Translators? 1. Assemblers Def: A program that translates assembly language into machine code. Dos machine instruction is generated for each source instruction - The resulting program ran only be executed when the assembly process is completed Operation: - Translates mnemonic operation codes into machine code & symbolic address into machine address - Includes the neressary linkages for closed subroutines and inserts appropriate machine code for macros - Allocates area of storage - Detects and indicates valid source language instruction - Procedures the object program on tape or disk required - The lesting may also include error codes if appropriate. To illustrate the methods used just think about an assembly program. We must first look at the directives A directive is used to control the assembly process, it is not asembled but is obeyed by the assembler when it is encouteded, e.g ”END”, is sometimes called a pseudo- operation code on pseudo-opcode 2. Interpreter A program which translates and executes each source statement in logical sequence as the program one instruction at a time, completely translating and executing each instruction before it goes onto the next - Interpreter, which deals with the source program one instruction at a time, completely translating and executing each instruction before it goes onto the next - Interpreter seldom produce object code but call upon inbuilt routines instead - Some intermediate code is usually produced tempororily - If an interpreter is used, the source program will be translated every time the program is executed - Interpreters are widely used, particular for the programming language Basic on small computers Interpriter are used for such things as: - Handling user commands in an interactive sys - Debugging programs as they run - Handling software produced for or by a different computer 3. Compilers: A program that translates HLL into a machine orientated language, often the machine code. Many machine instructions are generated for each source statement - The compiler: Translates the source program statements into machine code Includes linkage for closed subroutines Allcocates areas of main storage Generates the object program on cards, tape and disc as required Produces a printed listing of the source and objected programs when required Tabulates a lish of errors found during compilation - Compilers are commonly used for the translation of HLL program - Compiler translates the whole of the HLL source program into a machine code object program prior to the program being loaded into main memory and executed - If a compiler is used, the same program need only be translated once Stages of compilation lexical analysis systatical analysis code generation Chapter 7: SOFTWARE. Question 1. Application software? - Application software comprises the programs that are written specifically to achieve resulting appertaining to the company’s activities - Application software comes from two source They produce by themselves Buy from an external agency 1. Ads and dis of using application packages in house Ads - The requirements of the application are more easily met - There is more control in testing and debugging - The more control over the usage and support obtained Dis - There is a waiting period before the application can be implemented - Development cost is higher than buying a package 2. Ads and dis of using application package Ads: - The packages can be used immediately - Documentation is generally good - It can be used on a varisty of machines - It is cheaper as the costs of the packages are shared between many users - Comprehensive on line help information and guided tutorials available - Easily remembered command syntax - Can be used in confunction with other software in an integrated fashion Dis: - Modifications may be difficult for some applications - Package may be two generalized to suit user needs - Some features purchased may not be required - Support given depends on stability and professionalison of the vendor - User are required to comply with the owner’s regulations Question 2. Utility software? - Certain processing is common to a high proportion of computer users, and so utility software has been created to cater for this need - Utility software is intended to be sufficiently flexible to meet most user’s requirements and is tailored to meet their precise needs by means of parameter entered prior to use - Some of the utility programs described below may be incorporated into the OS that is used with a particular computer File conversion: this convers the transference of data from any medium to any other File copying: an exact copy of a data set is made on to another lot for the same type of storage medium File reorganisation: direct access, files over flow records are stored in designed blocked, this is acceptable up to a point but from time it si necessary to reorganise the file so as to remove the overflow File maintenance(amendment): this procedure involves the straightforward insertion and deletion of records into or form sequential files Sorting: is frequently necessary in order to arrange a set of records into a certain sequence based on their key values Dumping routines: a dump routine is used in confunction with a restfirt program House keeping operations: there are programs or parts of a programs not directly concerned with the solution of the problem in hand . be required - Support given depends on stability and professionalison of the vendor - User are required to comply with the owner’s regulations Question 2. Utility software? - Certain processing. mathematician - It was expressly designed as a language to make programming more systematic and discriplired and in these respects lends itself to structured programming - It is however more. control the assembly process, it is not asembled but is obeyed by the assembler when it is encouteded, e.g ”END”, is sometimes called a pseudo- operation code on pseudo-opcode 2. Interpreter A