Porting my 16 bit real mode OS to a 64 bit OS
Porting my 16 bit real mode OS to a 64 bit OS
I have been working on a 16 bit real mode OS for a while now. I would like to be able to make use of all of the hardware resources so I have been researching x86-64 assembly. I don't know where to begin. If any of y'all could recommend some articles or give me some tips that would be greatly appreciated. I am programmed in this in pure x86 NASM Assembly.
Re: Porting my 16 bit real mode OS to a 64 bit OS
the thing you need to read is the pci bus spec, it's what matter the most, maybe after acpi for up to date hardware , to understand how hardware ressource are configured on modern pc
if you need more info about intel memory model, it's also another story, but i can explain the basics if you need it
the best info you can find about intel related thing are intel manuals, they are avaible for free on their website, but hardware is configured via pci bus, and acpi can worth a look as well, you should be able to find resources you need from google or even this wiki contain lot of information and pointers to articles you might find usefull
if you need more info about intel memory model, it's also another story, but i can explain the basics if you need it
the best info you can find about intel related thing are intel manuals, they are avaible for free on their website, but hardware is configured via pci bus, and acpi can worth a look as well, you should be able to find resources you need from google or even this wiki contain lot of information and pointers to articles you might find usefull
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Porting my 16 bit real mode OS to a 64 bit OS
While h0bby1 is correct in fact, it's a little misleading.
@michaelk: If you already know 16-bit RM assembly... then remember to ignore most of that experience when starting on 64-bit, it's a very different architecture For getting started on it, I'd suggest looking at the architecture overview in the Intel manuals, as well as the articles on the wiki ([wiki]User:Stephanvanschaik/Setting_Up_Long_Mode[/wiki] is pretty good from a quick read)
@michaelk: If you already know 16-bit RM assembly... then remember to ignore most of that experience when starting on 64-bit, it's a very different architecture For getting started on it, I'd suggest looking at the architecture overview in the Intel manuals, as well as the articles on the wiki ([wiki]User:Stephanvanschaik/Setting_Up_Long_Mode[/wiki] is pretty good from a quick read)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: Porting my 16 bit real mode OS to a 64 bit OS
first you must get rid of all interrupt references(int 10, int 13, etc...).michaelk wrote:I have been working on a 16 bit real mode OS for a while now. I would like to be able to make use of all of the hardware resources so I have been researching x86-64 assembly. I don't know where to begin. If any of y'all could recommend some articles or give me some tips that would be greatly appreciated. I am programmed in this in pure x86 NASM Assembly.
next you need to put some direct hardware access stuff where the ints were.
next change all the memory/register references to 64bit.
next add some code in the bootloader(or kernel) to switch to long mode.
finally you compile and if it doesn't work, well... read up to see what needs to be fixed.