Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Newsgroups | alt.lang.asm |
|---|---|
| Subject | Re: MS-DOS utility to distinguish between standard & enhanced |
| References | <1480223923.367396@nyx2.nyx.net> <op.yrwup300msr2db@dell3100.dlink.com> <c1.2b8.3tWrhz$063@NOVOSAD3.EMBARQ.COM> |
| From | Donald G. Davis <dgdavis@blackhole.nyx.net> |
| Organization | Nyx Net, The Spirit of the Night |
| Message-ID | <1480965449.536956@nyx2.nyx.net> (permalink) |
| Date | 2016-12-05 19:19 +0000 |
Bogus@Embarq.com (Steve) writes:
>Hi,
>"Kerr Mudd-John" <admin@127.0.0.1> writes:
><Snip>
>>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.
> That seems more of a test to see if the BIOS supports extended keyboard
>functions. The memory byte at 40H:96H should indicate a 101 keyboard is
>attached if bit 4 is set.
>Regards,
>Steve N.
Thank you for your responses. I tried the BIOS 40H:96H approach
several years ago, with the following MASM code:
----------------
;KEYBID5.ASM
;Tests bit 4 of keyboard status byte (set=enhanced kb attached;
; clear=nonenhanced)
CSEG SEGMENT
ASSUME CS:CSEG,DS:CSEG
ORG 0100H
START:
MOV AX,40H ;Get BIOS parameters
MOV DS,AX
MOV AL,DS:BYTE PTR[96H] ;Get keyboard status byte 1
TEST AL,00010000B ;Bit 4 set?
JNZ ENH ;If so, keyboard tested as enhanced
XOR AL,AL ;If not, it didn't; return exit code 0
JMP SHORT EXIT
ENH: MOV AL,1 ;If it did, return exit code 1
EXIT: MOV AH,4CH ;Terminate with exit code
INT 21H
CSEG ENDS
END START
------------------
I haven't been able to find any mistakes in the above code, but
unfortunately, it always returns 1 for every keyboard I've tried, 101-
key or otherwise.
This BIOS keyboard-identification approach may not work for my
laptop in any case. I find that, unlike the display, which shows only on
the external monitor when one is attached, both the external and internal
keyboards can be used at the same time. I have no idea how the BIOS
keyboard-status byte, which appears to represent only one keyboard ID,
would handle this.
--Donald Davis
Back to alt.lang.asm | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: MS-DOS utility to distinguish between standard & enhanced keyboard? "Kerr Mudd-John" <admin@127.0.0.1> - 2016-12-03 19:50 +0000
Re: MS-DOS utility to distinguish between standard & enhanced Bogus@Embarq.com (Steve) - 2016-12-04 15:02 +0000
Re: MS-DOS utility to distinguish between standard & enhanced Donald G. Davis <dgdavis@blackhole.nyx.net> - 2016-12-05 19:19 +0000
Re: MS-DOS utility to distinguish between standard & enhanced Bogus@Embarq.com (Steve) - 2016-12-06 15:59 +0000
Re: MS-DOS utility to distinguish between standard & enhanced Donald G. Davis <dgdavis@blackhole.nyx.net> - 2016-12-08 20:38 +0000
Re: MS-DOS utility to distinguish between standard & enhanced "Kerr Mudd-John" <admin@127.0.0.1> - 2016-12-07 07:18 +0000
Re: MS-DOS utility to distinguish between standard & enhanced "Kerr Mudd-John" <admin@127.0.0.1> - 2016-12-07 07:19 +0000
Re: MS-DOS utility to distinguish between standard & enhanced Frank Kotler <fbkotler@myfairpoint.net> - 2016-12-07 09:24 -0500
Re: MS-DOS utility to distinguish between standard & enhanced "Kerr Mudd-John" <admin@127.0.0.1> - 2016-12-08 11:58 +0000
Re: MS-DOS utility to distinguish between standard & enhanced Frank Kotler <fbkotler@myfairpoint.net> - 2016-12-08 11:49 -0500
Re: MS-DOS utility to distinguish between standard & enhanced Melzzzzz <mel@zzzzz.com> - 2016-12-08 20:37 +0100
Re: MS-DOS utility to distinguish between standard & enhanced JJ <jj4public@vfemail.net> - 2016-12-09 06:22 +0700
Re: MS-DOS utility to distinguish between standard & enhanced Donald G. Davis <dgdavis@blackhole.nyx.net> - 2016-12-10 04:53 +0000
Re: MS-DOS utility to distinguish between standard & enhanced Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2016-12-07 19:52 -0500
csiph-web