home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / GRLF-C-2.ZIP / GFUNC / INPTOKBB.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-05-30  |  1.1 KB  |  49 lines

  1. ;/*
  2. ;** inptokbb.asm
  3. ;** contains:
  4. ;*/
  5.  
  6. KEYBOARDWRITE    equ    05h            ;ROM-BIOS Keyboard write function
  7. KEYBOARDINT    equ    16h            ;Keyboard software interrupt #
  8.  
  9.         include model.h
  10.         include prologue.h
  11.  
  12.         pseg inptokb
  13.  
  14. ;/*
  15. ;**  int
  16. ;** inptokbb(unsigned ScanChar)
  17. ;**
  18. ;** ARGUMENT(s)
  19. ;**  ScanChar        -    Scan code in high order 8 bits,
  20. ;**                character code in low order 8 bits.
  21. ;**
  22. ;** DESCRIPTION
  23. ;**  For AT BIOS dated 11/15/85 and after, PC XT dated 1/10/86 and after,
  24. ;**  PC XT Model 286, and Personal System/2 products, this function places
  25. ;**  scan code/character code combination in the keyboard buffer as if they
  26. ;**  came from the keyboard.  NOTE: This function uses the keyboard bios
  27. ;**  interrupt.
  28. ;**
  29. ;** RETURNS
  30. ;**  0 = operation successfully completed.
  31. ;**  1 = Buffer is full.
  32. ;**
  33. ;** AUTHOR
  34. ;**  ""   Fri 11-Nov-1988    09:42:50
  35. ;**   Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
  36. ;**
  37. ;** MODIFICATIONS
  38. ;**
  39. ;*/
  40.         cproc    inptokbb
  41.         mov    cx,parm1_        ;ch=scan code, cl=ascii code
  42.         mov    ah,KEYBOARDWRITE
  43.         int    KEYBOARDINT        ;call keyboard code
  44.         xor    ah,ah            ;status returns in al
  45.         cproce
  46.  
  47.         endps
  48.         end
  49.