8 Comments

Great writeup and what a lovely reminder of these old days! I had a similar curiosity of protected mode back around the same time, and ended up embarking on writing a very simplistic OS - I highly recommend it, if you have interest as there was a great deal I learned.

Expand full comment

In the sample code, you are setting the data_base_mid twice. Is this intended?

mov [code_base_mid], al

mov [data_base_mid], al

mov [code_base_high], ah

mov [data_base_mid], al

Expand full comment
author

Thanks! Fixed now. Last-minute copy/paste error IIRC.

Expand full comment

I see you conveniently skipped over VCPI, very wise :D.

Expand full comment
author

Good thing I didn't know about it!

Expand full comment
Feb 7Liked by Julio Merino

FYI the reason I wrote my first dos extender (go32) was because the available ones at the time didn't support virtual memory, and compiling gcc wasn't possible on my 4Mb PC otherwise... necessity is indeed the mother of invention!

Expand full comment
author

Thanks for chiming in! I'm curious: did you have to implement swapping as well? Or more generally, does any extender bother implementing it?

Expand full comment

I did - that was the whole point. There wasn't enough RAM to hold all of gcc, so I had to swap out unused parts of it to disk.

Expand full comment