en:ibm:prcp:kbd:charin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:ibm:prcp:kbd:charin [2014/05/13 14:15] – external edit 127.0.0.1en:ibm:prcp:kbd:charin [2016/09/15 02:17] (current) valerius
Line 1: Line 1:
 ==== KbdCharIn ==== ==== KbdCharIn ====
  
-**Bindings**: +**Bindings**: [[charin#C bindings|C]][[charin#MASM bindings|MASM]]
- +
-C: +
-<code c> +
-typedef struct _KBDKEYINFO {   /* kbci */ +
-  UCHAR    chChar;             /* ASCII character code */ +
-  UCHAR    chScan;             /* Scan Code */ +
-  UCHAR    fbStatus;           /* State of the character */ +
-  UCHAR    bNlsShift;          /* Reserved (set to zero) */ +
-  USHORT   fsState;            /* State of the shift keys */ +
-  ULONG    time;               /* Time stamp of keystroke (ms since ipl) */ +
-}KBDKEYINFO; +
- +
-#define INCL_KBD +
- +
-USHORT  rc = KbdCharIn(CharDataIOWait, KbdHandle); +
- +
-PKBDKEYINFO      CharData;      /* Buffer for data */ +
-USHORT           IOWait;        /* Indicate if wait */ +
-HKBD             KbdHandle;     /* Keyboard handle */ +
- +
-USHORT           rc;            /* return code */ +
-</code> +
- +
-Asm: +
-<code asm> +
-KBDKEYINFO struc +
-  kbci_chChar    db  ? ;ASCII character code +
-  kbci_chScan    db  ? ;Scan Code +
-  kbci_fbStatus  db  ? ;State of the character +
-  kbci_bNlsShift db  ? ;Reserved (set to zero) +
-  kbci_fsState   dw  ? ;state of the shift keys +
-  kbci_time      dd  ? ;time stamp of keystroke (ms since ipl) +
-KBDKEYINFO ends +
- +
-EXTRN  KbdCharIn:FAR +
-INCL_KBD            EQU 1 +
- +
-PUSH@  OTHER   CharData      ;Buffer for data +
-PUSH   WORD    IOWait        ;Indicate if wait +
-PUSH   WORD    KbdHandle     ;Keyboard handle +
-CALL   KbdCharIn +
- +
-Returns WORD +
-</code>+
  
 This call returns a character data record from the keyboard.  This call returns a character data record from the keyboard. 
Line 138: Line 94:
   * Status can be 0 or 40H    * Status can be 0 or 40H 
   * KbdHandle is ignored.    * KbdHandle is ignored. 
 +
 +=== C bindings ===
 +
 +<code c>
 +typedef struct _KBDKEYINFO {   /* kbci */
 +  UCHAR    chChar;             /* ASCII character code */
 +  UCHAR    chScan;             /* Scan Code */
 +  UCHAR    fbStatus;           /* State of the character */
 +  UCHAR    bNlsShift;          /* Reserved (set to zero) */
 +  USHORT   fsState;            /* State of the shift keys */
 +  ULONG    time;               /* Time stamp of keystroke (ms since ipl) */
 +}KBDKEYINFO;
 +
 +#define INCL_KBD
 +
 +USHORT  rc = KbdCharIn(CharData, IOWait, KbdHandle);
 +
 +PKBDKEYINFO      CharData;      /* Buffer for data */
 +USHORT           IOWait;        /* Indicate if wait */
 +HKBD             KbdHandle;     /* Keyboard handle */
 +
 +USHORT           rc;            /* return code */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +KBDKEYINFO struc
 +  kbci_chChar    db  ? ;ASCII character code
 +  kbci_chScan    db  ? ;Scan Code
 +  kbci_fbStatus  db  ? ;State of the character
 +  kbci_bNlsShift db  ? ;Reserved (set to zero)
 +  kbci_fsState   dw  ? ;state of the shift keys
 +  kbci_time      dd  ? ;time stamp of keystroke (ms since ipl)
 +KBDKEYINFO ends
 +
 +EXTRN  KbdCharIn:FAR
 +INCL_KBD            EQU 1
 +
 +PUSH@  OTHER   CharData      ;Buffer for data
 +PUSH   WORD    IOWait        ;Indicate if wait
 +PUSH   WORD    KbdHandle     ;Keyboard handle
 +CALL   KbdCharIn
 +
 +Returns WORD
 +</code>
 +
 +