#Computer-Science#CS250#Software

Compiled Languages

  • Compiled languages are high level languages compiled down to machine code that the computer can understand
  • Examples
    • Java
    • C
    • Literally almost any programming language, a lot of them are compiled.
    • Python Not python its interpreted
  • C is a minimal high level language
    • It has a simple compiler, making it easy to port to a new machine
    • It’s programs demand less of the machine

The compiling process for C

Source Code

  • Source files in C can have…
    • comments // I am a comment
    • preprocessor directives (#include statements)
    • C Code a = 10;
  • The C Preprocessor removes all comments and evaluates all directives, resulting in the preprocessed source code

Compiler

  • Compilers in general translate a high level language to the target language
  • Each hardware machine design has its own native machine language
  • Machine specific assembly language is often an intermediate step, letting you see exactly what’s going on at the computers level

Assembler

  • The assembler at this point converts the assembly language code directly into object code, which the computer can understand

Object Code

  • Hardware machine is an object
  • written in machine language, only thing the computer knows