Linked by Thom Holwerda on Sun 16th Sep 2007 20:39 UTC, submitted by M-Saunders
OSNews, Generic OSes MikeOS 1.0 has been released. It is an open source PC operating system, designed as a tutor for basic OS design and x86 assembly language. "MikeOS is a 16-bit operating system for x86 PCs, written in assembly language, which boots from a floppy disk or CD-ROM. It features a text-based dialog-driven user interface, a command-line, support for FAT12 (DOS) floppies and PC speaker sound. It can load external programs and has over 30 system calls. Basic DOS .COM program support is also included." This version includes a complete Handbook with a whole section on writing your own OS.
Thread beginning with comment 271910
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Sounds interesting.
by M-Saunders on Mon 17th Sep 2007 10:49 UTC in reply to "RE: Sounds interesting."
M-Saunders
Member since:
2007-09-17

Yeah, but by writing it in assembly and using IA16 is a bit, well, out of date?


It would be if MikeOS was meant to be a modern, general-purpose operating system. But it's not; it's a learning tool, and 16-bit real mode assembly is quite simple to grasp.

Once you throw in another language, you have to deal with linkers and stubs and it all gets rather messy. Besides, you have to use a bit of assembly to kick-start a kernel anyway, so you can't really avoid it.

Using 32-bit protected mode is a no-no. You lose (easy) access to the BIOS, and therefore have to write your own keyboard/screen drivers etc from scratch. By sticking with 16-bit real mode, the MikeOS code can focus on interesting stuff like loading programs and system calls -- not trying to faff around with the keyboard controller.

Reply Parent Score: 4

RE[3]: Sounds interesting.
by jal_ on Mon 17th Sep 2007 10:56 in reply to "RE[2]: Sounds interesting."
jal_ Member since:
2006-11-02

It would be if MikeOS was meant to be a modern, general-purpose operating system. But it's not; it's a learning tool, and 16-bit real mode assembly is quite simple to grasp.

I agree that real mode is perhaps better to use when starting out, but to call 16-bit real mode assembly 'quite simple' is a bit of an overstatement, with its total non-ortogonalness and weird memory layout. Yes, some asm must be learned to get the thing to boot etc., but a higher level language like C is really better to use as a teaching instrument, to hide all this crappy IA16 stuff.


JAL

Reply Parent Score: 2

RE[4]: Sounds interesting.
by M-Saunders on Mon 17th Sep 2007 11:28 in reply to "RE[3]: Sounds interesting."
M-Saunders Member since:
2007-09-17

It's what you make of it. Yes, 16-bit real mode memory management is hideous, but MikeOS avoids that completely by residing in a single 64K segment. The code never ventures outside that, so we can forget the memory complications.

And yes, x86 asm isn't as nice as, say, ARM, but the code is mostly movs, cmps and jmps, so it's not doing anything really obscure.

Reply Parent Score: 4

RE[3]: Sounds interesting.
by _df_ on Mon 17th Sep 2007 13:51 in reply to "RE[2]: Sounds interesting."
_df_ Member since:
2005-07-06

you do have to write your own drivers in pmode but staying with the bios, you lose mouse, cdrom, networking, sound, hard drive size restrictions, etc.

the originaly minix 16bit is probably the better educational os out there.

for a 16bit os, you can write it all in c with no asm since you dont need to deal with GDT or anything. you dont even need to write a bootsector you can re-use any old PC boot sector and just rename your os kernel to be IO.SYS on the root of a fat12/fat16 partition.

you make some easy wins really hard. and a 486 requirement for a 16bit os is overkill. a plain old 286 would suffice.

Reply Parent Score: 1

RE[4]: Sounds interesting.
by M-Saunders on Mon 17th Sep 2007 14:16 in reply to "RE[3]: Sounds interesting."
M-Saunders Member since:
2007-09-17

but staying with the bios, you lose mouse


Not true. I have a version of MikeOS with a preliminary GUI, using a PS/2 mouse.

Reply Parent Score: 2