movq

www.uninformativ.de

No description provided.

Recent twts from movq
In-reply-to » Good riddance 2024... 2025, be good or else.

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. 🥳

⤋ Read More
In-reply-to » 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.

@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

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
In-reply-to » It must already be New Year here. Full continuous fire for ten minutes.

@lyse@lyse.isobeef.org

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. 😂

⤋ Read More
In-reply-to » 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. 😅🤪

@prologic@twtxt.net Indeed, I’ve gained a lot more respect for Linux/BSD and DOS. 😃

⤋ Read More
In-reply-to » 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. 😅🤪

@prologic@twtxt.net Something along those lines, yeah. And/or some generic cache for disk sectors.

⤋ Read More
In-reply-to » 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. 😅🤪

@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. 😅

⤋ Read More
In-reply-to » 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. 😅🤪

(This issues a lot of BIOS calls, that’s why it’s so slow.)

⤋ Read More

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. 🥳

https://movq.de/v/21e91bafdb/los86-fat12.mp4

⤋ Read More
In-reply-to » 3°C today, it was quite nice in the sun. A lot of hunting and tree felling going on in the forest. And we met the heron again, that was very cool: https://lyse.isobeef.org/waldspaziergang-2024-12-28/

@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. 😂

⤋ Read More
In-reply-to » I’m currently writing a tutorial (in French) to learn the basics of 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.

⤋ Read More