2024 was okay for me, but 2025 is gonna be real shit. 😂 So much annoying stuff coming up. Gotta enjoy the moment, who knows how long it will last. 😅
Happy new year, you guys. 🥳
@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.
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
Luckily, it’s illegal to sell fireworks other than after the last three days in the year.
Interesting, didn’t know that. According to the following link, it’s even illegal to use it other than 31./1.: https://www.anwalt.de/rechtstipps/wann-wird-feuerwerk-zur-straftat-alles-was-sie-fuer-silvester-wissen-muessen-235257.html
Nobody knows that, apparently. 😂
@lyse@lyse.isobeef.org Certainly the last thing for this year. 😅 (How is this possible? Christmas already over and tomorrow is 2025? Time flies. 😩)
Made a little text editor for my 8086 toy operating system today. It can’t do much, but it allows for some basic editing. 💾
That was probably the last “big” thing I did for that OS in the near future. Vacation is coming to an end.
@prologic@twtxt.net Indeed, I’ve gained a lot more respect for Linux/BSD and DOS. 😃
@lyse@lyse.isobeef.org Oh, ah, that’s quite a lot of zoom. Still, 4m feels really close. Were you behind a bush? 😃
It’s getting Winter-y. Here’s that tree again: https://movq.de/v/07262a1e12/IMG_20241229_142030.jpg-small.jpg
@prologic@twtxt.net Something along those lines, yeah. And/or some generic cache for disk sectors.
@prologic@twtxt.net Lots, I guess. 😅 The kernel keeps almost no state between syscalls, so when you want to read the next byte from a file, it has to do all the work from scratch: Locate the file in the directory and traverse the cluster chain until you’ve reached the next byte. It’s easier to code this way, but obviously much slower. And the userspace program cp
could read/write in multiples of 512 – it currently does not do that, intentionally, because if everything is a multiple of 512, you’re less likely to discover bugs. 😅
(This issues a lot of BIOS calls, that’s why it’s so slow.)
That FAT12 implementation is very naive and unoptimized. You can see in this video that it takes about 7 seconds to copy a ~10 kB file: https://movq.de/v/fbf2b90ce1/los86-fat12-copy.mp4 🥴 I kind of like that, though, because it feels a little bit like an old machine. 😅🤪
(Yay, fixed. The bootloader assumed that the SS
register gets initialized to 0, which wasn’t true on that laptop.)
@prologic@twtxt.net I’m still a newbie at this myself. 😅 For example, I just noticed that it no longer boots on my old laptop after I rewrote the bootloader. 🫤
@prologic@twtxt.net Dunno, I don’t feel comfortable with it. I want this to be my private little pet project, instead of it being out in the open. 🤔
I uploaded a tarball, so you guys can take a quick look, if you like: https://movq.de/v/cc07a4203b/los86.tar.gz
@mckinley@mckinley.cc Thanks!
@prologic@twtxt.net I might do it some day. 😅
After taking a short break for Christmas business, I’ve worked on my little toy operating system for the 8086 again.
It understands the basics of FAT12 now. I’ve actually never sat down before to learn how FAT works. 🤦 Well, better late than never, I guess.
It can’t do subdirectories nor timestamps and I probably won’t implement that. One flat directory is good enough for my purposes and the OS has no notion of time, yet, anyway.
It’s really cool to be able to exchange files with the Linux host or other DOS VMs. 🥳
@lyse@lyse.isobeef.org Have you got a zoom on your camera now? That looks very close for a heron. 🤯
Looks like a lovely day indeed. We only had fog all day and I was too lazy to go outside. 😂
groff
+ mom
to typeset generalist PDF (not manpages). It’s my nerdy project for the time being, and it grew quite larger than I anticipated (it probably will have 40 pages when finished)… not because groff
is hard, but because my goal is people who never touched a formatting language, so I have to cover the basics.
@emmanuel@wald.ovh Oh, that’s going to be interesting. It’s been a moment since I’ve used groff.
@lyse@lyse.isobeef.org Also happens to me a lot, but sometimes it works. 🤔
I loved to watch the “Curiosity Show” when I was a kid (the German version, of course – to this day, nothing in German television is in English, it’s all dubbed horribly). And it’s on YouTube now! 🥳 https://www.youtube.com/@CuriosityShow/videos