↳ In-reply-to » Made a little program to print the system’s uptime on DOS, OS/2, and Windows NT:

@lyse@lyse.isobeef.org

Crazy, who comes up with things like that?

I didn’t come up with it, but I was close, I guess. DOS is so small, you don’t have much of a choice but to search for “anything related to time”. There aren’t that many syscalls/functions. You’ll quickly notice that there’s no global tick counter. So what else is there? Hmm, “get the mtime of a file” is pretty much the only other time-related thing. And which file is “stable”, probably allocated just once at boot? Mark Aitchison tried to use NUL, which is a pretty good idea. Thinking about it in retrospect, stdin does indeed make more sense, though, because that object really does get allocated just once at “boot” and then it stays the same. That’s not guaranteed for NUL (although just as likely).

But, it is possible in DOS to move “the console” to a serial port:

I wonder what that does to my little uptime program. :-)

Today, I also learned that -R is an alias for -r in rm.

Ah, I remember that. Dug it up and saved it in the blog: -R is more portable/consistent: http://movq.de/blog/postings/2026-09-30/0/POSTING-en.html

​ Read More
↳ In-reply-to » Made a little program to print the system’s uptime on DOS, OS/2, and Windows NT:

@movq@www.uninformativ.de Oh, it’s been a hot minute since I last came across Pascal. :-) When I first quickly skimmed through the code, my eyes fell on the reproducer in the comment and I immediately thought: This reminds me of Delphi! And sure enough, I then saw the .PAS file extension in the URL. That Kiwi applied some strange code formatting, I have to say, though.

Haha, that’s a sweet trick with stdin. Crazy, who comes up with things like that? It would have never crossed my mind to do stunts like that. :-D

Today, I also learned that -R is an alias for -r in rm. I think I never saw -R used here before. Of course for chmod and chown, but not rm.

​ Read More
↳ In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@zyak@twtxt.z85b.xyz Oh yeah. I know that too well with my digicam. It has good zoom, but it doesn’t help when birds are quickly disappearing again. You did good, keep ‘em coming. :-)

​ Read More
↳ In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@zyak@twtxt.z85b.xyz Beautiful! Is that the lizard snack? Poor little guy. When I visited Down Under, I petted a blue-tongued lizard. That was really cool. And I was very surprised how rough and bumpy that was. I expected it to be very smooth, but no, not at all.

​ Read More

Made a little program to print the system’s uptime on DOS, OS/2, and Windows NT:

https://movq.de/git/retrouptime/

(Release pending.)

This was pretty easy to do on Windows, a bit harder on OS/2 (because documentation is scarce), and quite the mess on DOS. DOS doesn’t explicitly keep track of the system’s uptime, so you have to resort to tricks like “give me the mtime of stdin”, which probably works 
 Yeah.

​ Read More