Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're right, it started as an attempt to fit into 512 bytes but right now it's 4 sectors (2KB). Of course, on a modern hard drive with 4KB sectors, we might stretch our definitions a bit :-) (Though the BIOS still only loads 512 bytes in such a case)


... and now there's a true 512-byte version as well (removing the text and shifting some of the variables to other memory did it) -- `make floppy_1sector.img`. Anyway, thanks for the prompt/challenge!


:-) Nice!


I got some serious deja vu reading that source code by the way. 24 years ago, as my senior year project I decided I would try to build a DOS-like OS that could boot from a floppy. I didn't get very far beyond a rudimentary CLI, some fun builtin commands and the beginnings of a FAT-like file system...

"hey, I made something that could boot from a 1981 PC, from scratch, and I understood it all the way.".

That's a pretty nice feeling - I think you probably felt the same way?


Yup, PC hardware is actually not too bad as a bare-metal platform, and everyone should try writing an OS once! Sounds like a fun senior project.




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

Search: