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
-Ris an alias for-rinrm.
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