Contemplating the 80186 (Was: Open questions in OS design)

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Troy Martin »

I'll consider doing an 86/88 branch of TBOS, but don't expect it to be constantly updated to every main branch version. The hardest thing will be emulating the pusha/popa in the boot sector.

EDIT: Have to write a macro for each of the "jxx near" instructions and for pusha/popa. Rolling and shifting must be done through cl for rolls/shifts greater than 1 place.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by jal »

Troy Martin wrote:EDIT: Have to write a macro for each of the "jxx near" instructions and for pusha/popa. Rolling and shifting must be done through cl for rolls/shifts greater than 1 place.
Yeah, it got some limitations, though it' still my favourite old CPU :).


JAL
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Troy Martin »

Correction on my part: The hardest part will be finding and implementing a boot sector for reading the FAT from a 360 or 720 KB floppy.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by jal »

Troy Martin wrote:Correction on my part: The hardest part will be finding and implementing a boot sector for reading the FAT from a 360 or 720 KB floppy.
What's difficult about it? I've always assumed a boot sector looks the same on any format, but I guess I'm wrong...


JAL
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by jal »

Some random links I googled which mention 360KB floppies:

http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html
http://wiki.fdos.org/Blog/Bernd

The second one has a bootable 360KB floppy image.


JAL
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Troy Martin »

Kewl, thanks. Expect a bootable TBOS 360 KB image within an hour :)
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by jal »

Troy Martin wrote:Kewl, thanks. Expect a bootable TBOS 360 KB image within an hour :)
Hehe, cool, although I don't think I can test it this week on my real box :).


JAL
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Troy Martin »

I just need to figure out where the hell the loaded kernel is loaded to by the boot sector...

EDIT: After changing the segment to load to, I've come across some unknown jump to an invalid opcode (unhandled since the 8086 didn't have an invalid opcode vector) that the bochs debugger can't help me with. Sh!t.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Love4Boobies »

There's bound to be some emulators/documentation on opcodes out there, I'm just too lazy to Google...
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
paxcoder
Member
Member
Posts: 33
Joined: Fri Jan 02, 2009 4:00 pm

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by paxcoder »

Ok, people: Who cares about 80186? I mean really. Noone has it.
Help this rabbit conquer the world by including it in your code: for(;;) fork();
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Troy Martin »

What's your point? It's fun to develop for. Doing things like this is what OS development is all about!
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by jal »

paxcoder wrote:Ok, people: Who cares about 80186? I mean really. Noone has it.
I have it. Well, I have an 8088, that's why I asked TroyM to down-port it. It's cool having old hardware run new things. Check e.g. SymbOS running on Z80 CPUs.


JAL
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by jal »

Ok, just look at this beauty I just saved from my company's trash bin :)

Image

Image


JAL
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Combuster »

Wow, that they still had that stuff :shock:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Contemplating the 80186 (Was: Open questions in OS design)

Post by Troy Martin »

Holy sh!t! Gimme gimme gimme :P
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
Post Reply