Question

I'm going to do a presentation about programming languages in our class, gonna talk about the basics. It's going to be a brief one, around 5-10 minutes. The audience has no knowledge in this subject.

One of the things I'm going to talk about is low-level and high-level languages, and machine code. To simplify and visualize the difference I created this image.

enter image description here

But this is just a guess. I'm not sure if this is correct. Probably not. Could you enlighten me on how this process works without going into too much detail?


I'm not sure if this is the right place to ask this question. If not, I'll move it to somewhere else. Guide me. Also, about the title and the tags, you can correct them.

Was it helpful?

Solution

What happens largely depends on your environment, so there is no one answer. A general high level view, considering you're starting with what appears to be the C language and assuming its a standard environment (not something such as a Java virtual machine) is that:

  1. A compiler converts C to assembly
  2. An assembler converts assembly to object code (what you show as "low-level language")
  3. A linker gathers one or more file of object code and attempts to fill out its needs with the content of libraries it knows about. This output is still object code, but step 3's object code was for a specific file's instructions only. This object code is in a format appropriate for step 4.
  4. A loader reads the program into memory, potentially satisfying dynamic links that are required to run the program. It takes operating system specific steps to create a process that will execute the program.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top