uhm!
first
isn't that t-h-eor-et-ical question?

second
What exactly do you mean???
by:
"lets say that i want to write a operating system and i know what to do when i wrote it how will i compile that will i have to compile it with a normal compiler or is there another way?"
??????