> I disagree here. You would only need reentrant handling if it could > happen that int 15.4f is called while int 15.4f already is busy. > This is unlikely for two reasons ...
Agreed: Unlikely, but absolutely not impossible. Drivers should be designed to handle even unlikely events without crashing the machine. The fact that the machine is about to reboot isn't a valid reason to let it possibly crash, IMHO. > Int 15.4f is not supposed to do anything else than keyboard layout > translations so there is no "far worse". "Far worse" includes a potential loss or corruption of data. Though, as you stated, the caches and buffers _should_ already be flushed. > It is not the job of int 15.4f to toggle LEDs etc. The standard way > to do that is to manipulate the bits at 40:17 and then call int 16.1 > to give the BIOS a chance to sync with that. Neither int 9 nor int > 15 manipulate the LED in that context, it seems. At least in MS KEYB, it is part of the INT 9 handler. In perusing the PC/AT BIOS source code, I don't see where INT 16.01 issues any I/O to the keyboard controller to manipulate the LED's, so I'm not sure how the LED's would get changed that way. Maybe I'm missing something, though. > To create fake keystrokes, use int 16.5, again avoiding direct I/O > manipulation and staying on the 40:xx keyboard buffer level. There are a couple of problems with that approach. The first is that not all keys on the keyboard end up in the BDA/keyboard buffer (Pause, PrintScreen, SysReq, Left/Right Windows/GUI, Power/Sleep/Wakeup, multimedia keys, etc.). If these keys are to be simulated, it must happen at the scancode level, not the BDA level. The second problem is that some programs provide their own INT 9 handler, and don't even use the BDA at all. For these kinds of programs, the simulation must also happen at the scancode level. Particularly in the case of USB, where the USB keyboard may be the only one the computer has, simulation at the scancode level is the only viable option. Simulation at the BDA level would almost be pointless. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user