On 4/14/23 20:38, Virgo Pärna via fpc-pascal wrote:
On Thu, 13 Apr 2023 20:53:09 -0400, Travis Siegel via fpc-pascal 
<fpc-pascal@lists.freepascal.org> wrote:
I know of no way to obtain the pause key status under windows.  I can
        Considering, that only Caps Lock, Scroll Lock and Num Lock keys
have status lights on keyboard I would suspect, that there is not such
thing as Pause status on PC keyboard.

There is such a thing under DOS, because the BIOS treats the Pause key in a special way. When you press it, the BIOS enters a loop and stops execution of your program, until you press Pause again. This is done, so that you can pause the output to the console, in case it is scrolling too fast, so that you can examine it. For this purpose, there's a flag in the BIOS data area, which is documented here:

http://www.techhelpmanual.com/58-keyboard_shift_status_flags.html

Bit 3 (mask 08h) at 0040h:0018h contains the Pause status. However, I don't think there's such an equivalent under Windows and Linux. Actually, the Linux console (but not X11!) uses Scroll Lock to pause the console output, pretty much the same way DOS and BIOS used the Pause key. Why didn't Linus Torvalds use the Pause key is beyond me.

Nikolay

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to