home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / API / FOXBIOS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-26  |  1.5 KB  |  51 lines

  1. /*------------------------------------------------------------------*/
  2. /* FOXBIOS.C                                                        */
  3. /*------------------------------------------------------------------*/
  4. /*                API  ▒`   ªí                    ╗y      ¬k        */
  5. /*------------------------------------------------------------------*/
  6. /*    1. IsNumLock()    ( in FOXBIOS.C )         ISNUMLOCK()        */
  7. /*    2. SysTimer()     ( in FOXBIOS.C )         SYSTIMER()         */
  8. /*    3. LptPortAdr()   ( in FOXBIOS.C )         LPTPORTADR(<expN>) */
  9. /*------------------------------------------------------------------*/
  10. /* API ¿τ╝╞└] : foxbios.plb                                         */
  11. /*------------------------------------------------------------------*/
  12.  
  13. #include <stdlib.h>
  14. #include <dos.h>
  15. #include <string.h>
  16. #include <bios.h>
  17. #include <pro_ext.h>
  18.  
  19. FAR IsNumLock()
  20. {
  21.   _RetLogical(_bios_keybrd(_KEYBRD_SHIFTSTATUS) & 0x0020 ? 1:0);
  22.   return;
  23. }
  24.  
  25. FAR SysTimer()
  26. {
  27.  unsigned long far *SysTimer=(unsigned long far *)0x0040006c;
  28.  _RetInt((long)*SysTimer,10);
  29. }
  30.  
  31. FAR LptPortAdr(ParamBlk FAR *parm)
  32. {
  33.  unsigned short far *PrtPort=(unsigned short far *)0x00400008;
  34.  _RetInt(((long)PrtPort[(unsigned short)
  35.  parm->p[0].val.ev_long] & 0x0000ffff),10);
  36. }
  37.  
  38. FoxInfo myFoxInfo[] =
  39. {
  40.         {"ISNUMLOCK",IsNumLock,0,""},
  41.         {"SYSTIMER",SysTimer,0,""},
  42.         {"LPTPORTADR",LptPortAdr,1,"I"}
  43. };
  44.  
  45. FoxTable _FoxTable =
  46. {
  47.         (FoxTable FAR *)0,
  48.         sizeof(myFoxInfo) / sizeof(FoxInfo),
  49.         myFoxInfo
  50. };
  51.