this is a very big question, i suggest starting by getting the
**Holy Intel Manuals**
availible for download or free hard-copy at:
## ---- ----- ------ Intel Manuals
(alternativly, you could get the AMD version -- its basically the same set of books, but it is organized differently, and some of the wording is a little different -- some people prefer it, others prefer the Intel ones)
as these books will give you much information about the GDT, IDT, Paging tables, PMode/LMode initialization, and other important details
then read them 2 times, then ask more specific questions as you need them
are you using a boot-loader, or coding your own? this will make a big difference about where to start, and how to do it!
ps: last i checked, both Intel and AMD were in the process of updating the books, therefore, hard-copies were unavailible -- but you can still download the online ones -- hard-copies will be availible once the new revision is ready