Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6501

How do I execute raw machine code in C when writing a kernel? [duplicate]

$
0
0

Recently, I posted a question on stackoverflow that quickly became unactive and nobody answered anything that helped. I realized I wasn't clear, so I decided to become more clear.

How could I execute raw machine code in C? Like placing bytecode in a char array, and then jumping to it, so that it could get executed as raw machine code?

I am trying to make an operating system, where the kernel is in C. I've looked already on stackoverflow and many other websites, but the code that people answered weren't compatible with the -ffreestanding option on the GNU C compiler.


Viewing all articles
Browse latest Browse all 6501

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>