foone Profile picture
23 Nov, 15 tweets, 3 min read
so as of MS-DOS 2, there are two types of devices:
character devices are a linear stream of characters, in or out. example devices are a keyboard, display, or printer.
block devices transfer blocks. these are floppies, hard drives, CD-ROM drives.
make sense?
so there must be at least four "BOOT" drivers. every system has these.
These come before all other character and block drivers.
the first is stdin/stdout/stderr, called CON
the second is the auxiliary input/output (sometimes this is a serial port)
the third is considered "standard list output" and is named PRN, so it's either for printers or porn. My money is on printers.
but the fourth one, the one that comes before any block devices that might store programs or data files?

it's slightly weird. it's a character stream, and you may be surprised at what it is
it's CLOCK
because the original IBM PC did not have a real time clock, quickly people started building add-on cards for clocks and including them in 3rd party PC clones. Image
so to support these in DOS and let them easily integrate with DOS, they were included as a basic device type in MS-DOS 2.0
There's basically only 6 device types in MS-DOS 2.0:
block, char in, char out, NUL, CLOCK, and OTHER Image
oh no! SPECIAL devices will only be supported on MS-DOS 2.0, released in October 1983! I better hurry up and use it before Mean Mr. Microsoft disables it.
Lemme just take a big sip of my drink and then look at the calendar Image
so the interesting thing about this driver is which side of the OS it's on.
it's not providing a special device you or your programs can query to find out what time it is (although I suppose it would work for that)
there were already DOS APIs for that
the point of this is to provide TO THE OS a clock. because basically Microsoft is saying "we have no idea how you implement clocks on your weird computers, so just give us a device driver we can query"
it also means that they decided this was one of the fundamental device types they needed to be able to support when they added these new fancy device drivers to their OS
we gotta support DRIVES and SCREENS and KEYBOARDS and PRINTERS and CLOCKS.

the five types.
the five genders
amusingly I have a device to add an real time clock to a PC, and it doesn't use this interface at all.
Instead of being a character device, it just has a program you have to run to query the clock, and you need to put it in your autoexec.bat. it also has a y2k bug. Image
I suspect they made it work this way because they didn't want to use the new interface, as they wanted it to work even on PCs running DOS 1.x

• • •

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with foone

foone Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Foone

24 Nov
Fun fact: despite being 410 years old, the King James Bible is still under copyright in the UK.
I wonder if Disney has considered this. Make Walt Disney into King Walt the First, and then figure out a chain of inheritance from there.
The reign of Michael the Second (born Eisner) was particularly disastrous.
Read 37 tweets
24 Nov
it's been zero days since I've asked a perfectly reasonable question and google has looked at me like I'm mad.

I'm gonna have to read the source code like some kind of cave man
egcs-2.91.66, compiled in march 1999. That's the compiler I need.
Read 5 tweets
23 Nov
I'm not an expert on floppies, but that's probably not a good sign.
I'm testing my new greaseweasle disk, and I happened to grab some 400k/800k mac disks to test it on. it turns out it doesn't work for those yet.
new greaseweasle disk CONTROLLER, I mean
Read 21 tweets
23 Nov
I've now got the adapter to let me get to the JTAG port on my toaster!
- sentences that sound weird if anyone but Foone says them
I gotta figure out where my programmer is, though.
There's a law of equivalent exchange for people with ADHD: you cannot find something without losing something else.
Read 5 tweets
23 Nov
ahh, fuck. I was afraid of this. this yubikey is useless.
gnubby is "yubico but google"
it seems to be basically the same as a regular yubikey except because it's on completely different USB IDs, the standard tools don't work with it, and the only way to fix it involves tools google keeps secret.
I found it in my bag. I thought I had a yubikey that was a regular one and could be reused, but nope! apparently this is a google one, and the google ones absolutely cannot be reused. they're e-waste now.
Read 19 tweets
23 Nov
I'd make a joke about how it depends on if the JWST actually makes it into space or not, but I've worked for the government before, their funding levels have nothing to do with performance
I was part of a division that had spent 10 years digitizing old paper records and was doing very well, fighting a subcontractor that was scamming us at every turn, and then because there was a fight between the republicans and obama, we got all our funding cut.
at the same time as our subcontractor got sued for fraud and was about to never work with us again, and was going to throw away all 10 years of data.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!