go to previous page   go to home page   go to next page hear noise

Answer:

To the source program, where the change is easy to make with a text editor. The changed source program is then translated into a new executable program.


Program Translation

Translating a source program

The picture shows what usually happens with programs written in C (Java is different; it will be discussed in the next chapter.) Here is an overview:

  1. The source program is created using a text editor.
    • It contains instructions in a high level language.
    • It contains bytes that represent characters.
    • The source program is kept on the hard disk.
    • The source program can not be run by the processor.
  2. A translator (compiler) program translates the source program into an executable program.
    • The source program remains unchanged; a new executable program is created.
    • The executable program contains machine instructions.
    • A translator translates from a specific high level language (like C) into machine instructions for a specific processor type (like Pentium).
    • The executable program is also kept on hard disk.
  3. The program is run by copying machine language from the executable program on disk into main memory. The processor directly executes these machine language instructions.

QUESTION 10:

Can the processor directly execute the machine language that the program has been translated into?