As I understand it, Control-Break and Control-C are effectively the same. DOS hooks interrupt 1Bh and invokes interrupt 23h whenever Control-Break is pressed. So you only need to hook interrupt 23h to ensure a clean exit. Or am I missing something?
Right, but I was referring to the need to ensure a clean exit. If you're only using the BIOS for keyboard handling and the user hits Control-Break then the BIOS will invoke interrupt 1Bh, right? And since DOS has hooked that interrupt it will in turn invoke interrupt 23h. So all I need to do is hook interrupt 23h to be able to quit gracefully. At least that's my understanding of how it works.
Depends at what level Chuck. Ctrl-Break is just a scancode like any other, what you do with that scancode is up to youCtrl-C can be treated as a standard character; see, for example, the "Page Down" function in WordStar. That's not true of Ctrl-Break.
At a hardware level (on an AT or newer), the BREAK key is quite special. It does not follow the make/break (down/up) convention, and needs to be handled specially in the state machine if you want to detect it. It is not possible to detect when the key is released either. So not strictly a scancode like any other.Depends at what level Chuck. Ctrl-Break is just a scancode like any other, what you do with that scancode is up to you
Nice, I remember that from DOS Stuff Microsoft Forgot.Well sure--back in the day, I wrote a popup utility (ConFormat) that did its own keyboard decoding by intercepting interrupt 9. The idea being that you could continue work as usual while your floppies were formatted.
Even at the DOS level, there are exceptions. See, for instance Int 21h, AH=6 DL=0xFF. Does not check for either Ctrl-break or Crtl-C, unlike, say, Int 21h, AH=1.
But that's probably more than the OP wanted to know.