assembly - Is it possible to generate native x86 code for ring0 in gcc? -


i wonder, there ways generate gcc native x86 code (which can booted without os)?

the question isn't well-formed. not of instructions needed initialize modern cpu scratch can emitted gcc alone, you'll need use assembly that. that's sort of academic because modern cpus don't document stuff , instead expect hardware manufacturer ship firmware it. after firmware initialization, modern pc leaves either in old-style 16 bit 8086 environment ("legacy" bios) or clean 32 or 64 bit (depending on specific hardware platform) environment called "efi boot services".

operations in efi mode done using c function pointers, , can indeed build environment using gcc. see gummiboot boot loader excellent example of working efi.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -