Okay, this is pretty cool. My 8086 toy OS running on my old Pentium from an actual floppy disk. 😍 I just love that sound and the feeling of using floppies. This brings back so many memories from my early DOS days.

The cp-unopt program copies a file and intentionally uses small unaligned reads/writes (hopefully triggers more bugs).

The I/O cache works “okay-ish”, I guess. When sha1 runs, it has to do a few reads for the first file and basically none for the second one. Both could have been served entirely from the cache, theoretically. (But even just having an I/O cache in the first place speeds up things dramatically.)

Notice how there’s an EA file. That’s a left-over from OS/2, because I copied some files to the floppy using OS/2. In other words, my FAT12 implementation survives OS/2 writing to it. 🥳 (But I guess it should show up as EA DATA.SF. My current code starts at the left and stops at the first space.)

https://movq.de/v/d4d50d3c74/los86-on-p133-from-floppy-small2.mp4

⤋ Read More

@prologic@twtxt.net Yes, it’s all written from scratch, but most of it is written in C (not Assembler) and having a C standard library available helps a lot. It’s not that different from writing a program for DOS, just the syscalls are different. 😅

@lyse@lyse.isobeef.org Scrolling the viewport was the most annoying part. 🥴 The code also assumes that it is running on a “fast” PC. There are no “elaborate” data structures like a gap buffer. (But it does use dynamic arrays, which Wikipedia lists as a special case of a gap buffer. 🤔)

To display text on the screen, the editor writes directly to video memory (https://wiki.osdev.org/Printing_To_Screen). This is a blessing and much easier than fiddling with escape sequences. I wish you could do something like that on a Linux terminal.

⤋ Read More

Participate

Login to join in on this yarn.