Hacker News new | past | comments | ask | show | jobs | submit login
Itsy-OS: A simple 380 byte OS kernel (retroprogramming.com)
88 points by impomatic on March 30, 2011 | hide | past | favorite | 8 comments



Really cool experiment, although a bit difficult to extend as there are only 132 bytes remaining for loading anything else from the disk, which is not much (the boot sector is normally 512 bytes long on x86).


The demoscene notwithstanding, anybody counting bytes like this will probably be putting their OS in flash/ROM, not on a hard drive.


Correct me if I am wrong. Isn't it likely that you would create a quick bootloader in the 512 byte long boot-sector, and then load this Itsy-OS from storage (e.g. flash, ROM, etc). Ofcourse it would require the bootloader to be written...


Normally you would be right but I think since we're talking about kernel code golf here, it's only fair to consider the bootloader (if there's any) as part of the kernel.


It's even worse if you use the "standard" DOS partitioning system, only 440 bytes are available. (446 if you get fancy)


You could pack this into a kernel loaded from Grub and pack a fair amount more in.


Actually all you would have to do would be to load the next n sectors and jump to the beginning.

Thats easily done in 132 bytes.


I really like this. It's a good bootstrap environment for a kernel or scripting language of sorts. You could just about squeeze something to pull a block or two off disk with the BIOS on the end and kick off something more complicated.

Will have to dig out bochs tonight :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: