How is machine code understood by the machine
Posted
by
Kraken
on Stack Overflow
See other posts from Stack Overflow
or by Kraken
Published on 2012-10-14T15:21:34Z
Indexed on
2012/10/14
15:37 UTC
Read the original article
Hit count: 143
I have a very naive question here, and I would like you to correct me on whatever wrong concepts I put out here. The question is as follows:
I have ubuntu installed on my machine, now I write a helloWorld.c
program in C
language. Now, on the operating system I have a compiler installed, when I execute my helloWorld.c
program, the OS schedules the compiler and that basically compiles my code into machine code, which eventually, I execute.
Now my kernel code is written in C, then how does my machine interprets that code? Say my kernel code is helloWorld.c
, now would not I require any compiler, to compile this code. Also, if I hardcode a compiler in maybe ROM or something, then what language is it written in? Assembly language?
Let me know if I have made myself clear with the problem.
Thanks.
EDIT: By kernel code I mean, the code for operating system. Operating System code. I guess it is written in C right?
© Stack Overflow or respective owner