Re: Any reason to do 16-bits?
Posted: Fri Jan 08, 2016 5:08 pm
I've done both 16-bit and 32-bit OS proof-of-concepts, and I would say that you can get away with 16-bits as long as you aren't planning on using graphics mode (anything over 320x200x32/mode 13h), digital audio, digital video, or otherwise needing to deal with over 1 MB of system memory at a time.
So, basically you can do text mode in 16-bit, but you will need to go to 32-bit to do anything else substantial.
So, basically you can do text mode in 16-bit, but you will need to go to 32-bit to do anything else substantial.
I'm also mixing 16-bit and 32-bit code in one of my boot loader stages, which I'm not thrilled with, but it doesn't bother me enough to actually change it. I have slightly different boot loaders for floppy disk, hard disk, CD-ROM, USB and Network boot. Some of them are 32-bit only, and some of them are 2-stage 16-bit/32-bit, and some are 3-stage 16-bit/mixed/32-bit designs. I occasionally modify them, as needed, but I'm sure that they'll probably all be replaced by GRUB one day...My first stage boot loader (512 bytes) loads a 2nd stage (up to 64K) in, obviously, real mode. The second stage switches to PM, which brought up an issue: do I make a 3rd stage boot loader (how many freakin bootloaders do I want?) or do I mix 16 and 32 bit code (sounds messy).