1 / 14

Programming Languages

Programming Languages. Lecture L12.1 Section 12.1. Programming Hierarchies. Low-level and High-level Programming Compatibility. Programming Hierarchies. Lowest level construct: Wire signals Recall from before. Programming Hierarchies. Lowest Level Language: Machine Code.

graybill
Download Presentation

Programming Languages

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. Programming Languages Lecture L12.1 Section 12.1

  2. Programming Hierarchies • Low-level and High-level Programming • Compatibility

  3. Programming Hierarchies • Lowest level construct: • Wire signals • Recall from before

  4. Programming Hierarchies • Lowest Level Language: • Machine Code 8086 Microprocessor

  5. Programming Hierarchies • A Level Higher: • Assembly Language 8086 Microprocessor

  6. Programming Hierarchies A Hierarchy of Programming Languages

  7. Programming Hierarchies • Higher level languages – Advantages • Create programs faster • Easier to manage program development in large or small groups • Easier to manage program evolution • Easier to think about program components, i.e. Functions, Objects • Create a layer (compiler) that can compile the same source code to different target microprocessor architectures

  8. Programming Hierarchies • Higher level languages – Disadvantages • Code can be less optimized – run slower than if done in assembly • High-level languages are designed for optimally developing different types of software, it’s important to choose the correct one

  9. Some High-level Programming Languages

  10. A Computer Program • Source Code File • Contains the words written by a computer programmer • Object Code File • Usually produced by a compiler • The Source code translated into Machine Code • Executable File (.EXE) • One or more object code files linked together and possibly with one or more library files • Can be executed on the microprocessor • Operating System • Performs basic functions such as tracking files & directories and controlling peripheral devices • Provides a platform on top of which other programs run

  11. A Computer Program

  12. Compatibility • Compatibility • Depends on the machine code for the processor and operating system • Some popular Intel, AMD, Cyrix microprocessors, for example, have compatible machine codes • Executable files can be run on any of these microprocessors (with an operating system) • No recompilation required

  13. Compatibility (cont’d) • Other microprocessors don’t have the same machine codes but they do have a C compiler that will compile the source code for their target architecture • Executable files for one microprocessor can not be run directly on the other • Source code files can be recompiled to an object file/executable file that will run on the target microprocessor • Sometimes modifications must be made to the • C program for it to work (usually slight) • Process of modifying is called ‘porting’

  14. Compatibility • Not all microprocessors (or microcontrollers) implement enough machine codes to make it worthwhile to develop C (or other) compilers for them. • Some microprocessors have limited assembly • Specific-purpose processors • Processors designed for simple, small tasks • Programming usually is at the assembly level

More Related