home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------*/
- /* FOXBIOS.C */
- /*------------------------------------------------------------------*/
- /* API ▒` ªí ╗y ¬k */
- /*------------------------------------------------------------------*/
- /* 1. IsNumLock() ( in FOXBIOS.C ) ISNUMLOCK() */
- /* 2. SysTimer() ( in FOXBIOS.C ) SYSTIMER() */
- /* 3. LptPortAdr() ( in FOXBIOS.C ) LPTPORTADR(<expN>) */
- /*------------------------------------------------------------------*/
- /* API ¿τ╝╞└] : foxbios.plb */
- /*------------------------------------------------------------------*/
-
- #include <stdlib.h>
- #include <dos.h>
- #include <string.h>
- #include <bios.h>
- #include <pro_ext.h>
-
- FAR IsNumLock()
- {
- _RetLogical(_bios_keybrd(_KEYBRD_SHIFTSTATUS) & 0x0020 ? 1:0);
- return;
- }
-
- FAR SysTimer()
- {
- unsigned long far *SysTimer=(unsigned long far *)0x0040006c;
- _RetInt((long)*SysTimer,10);
- }
-
- FAR LptPortAdr(ParamBlk FAR *parm)
- {
- unsigned short far *PrtPort=(unsigned short far *)0x00400008;
- _RetInt(((long)PrtPort[(unsigned short)
- parm->p[0].val.ev_long] & 0x0000ffff),10);
- }
-
- FoxInfo myFoxInfo[] =
- {
- {"ISNUMLOCK",IsNumLock,0,""},
- {"SYSTIMER",SysTimer,0,""},
- {"LPTPORTADR",LptPortAdr,1,"I"}
- };
-
- FoxTable _FoxTable =
- {
- (FoxTable FAR *)0,
- sizeof(myFoxInfo) / sizeof(FoxInfo),
- myFoxInfo
- };