1 / 25

Systems Software

Systems Software. Program. A program is a set of instructions which tell the CPU what to do Programs are usually written in a team environment. Instructions. Program instructions are written using a special programming language Different languages use different syntax (rules).

Download Presentation

Systems Software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Systems Software

  2. Program • A program is a set of instructions which tell the CPU what to do • Programs are usually written in a team environment

  3. Instructions • Program instructions are written using a special programming language • Different languages use different syntax (rules)

  4. Programming languages • These are classed as follows: • Low Level Language • High Level Language

  5. Low Level Language • A computer language that uses commands that we do not necessarily understand as humans • Machine Code • Assembly Language

  6. Machine Code • A computer language that uses binary numbers to represent commands: 111111111111111111111111 000000000000000000000000 101010101010101010101010 010101010101010101010101

  7. Machine Code • All program instructions must be translated into Machine Code so that the instructions can be carried out by the CPU

  8. Advantages: Machine Code • As this is the computers own language, programs run very fast as the instructions are understood easily (by the computer)

  9. Disadvantages: Machine Code • Difficult for humans to program in Machine Code • Difficult to locate errors (DEBUG)

  10. Assembly Code • A computer language that uses letters, punctuation and numbers to represent commands: • LDA 50 • Load the accumulator with the number 50 • STA &64 • Store the contents of the accumulator in the memory location with address 64

  11. Assembly Code • Instructions written in assembly code must be TRANSLATED into machine code before the CPU understands the instruction

  12. Advantages: Assembly Code • Programs run very quickly as the translation process is fast due to the use of MNEMONICS. • A mnemonic is an abbreviation or shortened word

  13. Disadvantages: Assembly Code • Difficult for humans to program in Assembly Code • Difficult to locate errors (DEBUG)

  14. High Level Language • A computer language that uses commands similar to the English Language • True Basic • Comal • Pascal • Fortran • Prolog

  15. True Basic ! Program by Mr G, 23/10/01 ! This program will display a train PRINT “ ___________ @ “ PRINT “ l __ l _ @ “ PRINT “ _____l l__l l________l l “ PRINT “ l l “ PRINT “ l____ ________ _______l “ PRINT “ O O “ END

  16. Advantages: HLL • Easier to read, understand and write programs • Easier to locate errors (Debug) • Portability: • Programs can be altered so that they can run on different Operating Systems

  17. Disadvantages: HLL • Instructions written in a HLL must be TRANSLATED into machine code before the CPU understands the instruction • This takes time making the program slower to run

  18. Translator Programs • Programs which will translate the instructions of a program into Machine code. • There are 3 types of translator: • Assembler • Interpreter • Complier

  19. Q Questions • Page 77 • All Foundation and General Questions

  20. Assembler • Translates the instructions of an assembly code program into Machine code. LDA &28 00001111 CLE &87 111111111 JMP &4 101010101 STA & 67 000111000 SOURCE CODE OBJECT CODE

  21. Note: Assembler • Changes are not easily made. • The original source code will have to be edited and translated again • Runs fast • Produces Object Code which can be run without the assembler being present in memory - efficient

  22. Interpreter • Translates the instructions of a program written in a HLL into Machine code one instruction at a time. LET TOTAL = 0 000001111010100001101010111 FOR COUNTER = 1 TO 10 PRINT “PLEASE ENTER NUMBER” INPUT NUMBER LET TOTAL = TOTAL+NUMBER NEXT COUNTER PRINT “THE TOTAL IS “;TOTAL END

  23. Note: Interpreter • Easier to learn to program as errors are identified as commands are entered • Changes are made easily • Runs slower • Must have the interpreter for the program to run (requires more memory). • Does not produce Object Code

  24. Compiler • Translates the instructions of a program written in a HLL into Machine code in a single operation. LET TOTAL = 0 000001111010100001101010111 FOR COUNTER = 1 TO 10 101010101010101010101010101 PRINT “PLEASE ENTER NUMBER” 000111000111000111001110010 INPUT NUMBER 111111111111111111111000000 LET TOTAL = TOTAL+NUMBER 111111110000000000000000000 NEXT COUNTER 111111111111000000000011111 PRINT “THE TOTAL IS “;TOTAL 000000000011111111100000001 END 111100001110001110001110001 SOURCE CODE OBJECT CODE

  25. Note: Compiler • Changes are not easily made. • The original source code will have to be edited and translated again • Runs fast • Produces Object Code which can be run without the compiler being present in memory - efficient

More Related