Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.msdos.batch > #4850
| From | "Kerr Mudd-John" <admin@127.0.0.1> |
|---|---|
| Newsgroups | alt.msdos.batch, alt.lang.asm |
| Subject | Re: MS-DOS utility to distinguish between standard & enhanced keyboard? |
| Date | 2016-12-03 19:50 +0000 |
| Organization | dis |
| Message-ID | <op.yrwup300msr2db@dell3100.dlink.com> (permalink) |
| References | <1480223923.367396@nyx2.nyx.net> |
Cross-posted to 2 groups.
On Sun, 27 Nov 2016 05:20:37 -0000, Donald G. Davis
<dgdavis@blackhole.nyx.net> wrote:
> I'd like to learn whether someone knows of a MS-DOS utility that can
> tell whether a "standard" (older) keyboard or a 101-key keyboard is
> attached to the computer, and report accordingly, preferably with a
> suitable exit code for input to a batch file.
>
> --Donald Davis
I've found an old Delphi forum post:
function status:word;
inline(
$B8/$00/$12/ {MOV AX,1200h}
$CD/$16 {INT 16h }
);
{$ifdef msdos}
const seg0040=$40;
{$endif}
begin
tmp:=mem[Seg0040:$17];
extended_kbd:=false;
if lo(status)=tmp then begin
mem[Seg0040:$17]:=tmp xor 7;
tmp2:=status;
extended_kbd:=(tmp2<>$1200) and (lo(tmp2)=tmp xor 7);
mem[Seg0040:$17]:=tmp;
End;
end.
It's mostly asm. Toggles a shift key then uses an extended keyboard call
to see if it's changed.
Should be easily rewritten in asm or ascii asm for use in batch.
(xposted to asm & batch groups)
--
Bah, and indeed, Humbug
Back to alt.msdos.batch | Previous | Next — Previous in thread | Find similar | Unroll thread
MS-DOS utility to distinguish between standard & enhanced keyboard? Donald G. Davis <dgdavis@blackhole.nyx.net> - 2016-11-27 05:20 +0000 Re: MS-DOS utility to distinguish between standard & enhanced keyboard? golem <golem@wherever.nix> - 2016-11-29 06:52 +1100 Re: MS-DOS utility to distinguish between standard & enhanced keyboard? "Kerr Mudd-John" <admin@127.0.0.1> - 2016-12-03 19:50 +0000
csiph-web