📄 devlib.h
字号:
/************************************************************************
** MODULE INFORMATION*
**********************
** FILE NAME: devlib.h
** SYSTEM NAME:
** ORIGINAL AUTHOR(S): Paul Lemmers
** VERSION NUMBER:
** CREATION DATE: 1990/8/14
**
** DESCRIPTION:
** Include file for OS/2 device driver functions
** Do not expect to find a ".lib" file even if the name
** suggests the existance. The library is a large collection
** of object files since the link list must decide which and
** where to link the module. Some parts are resident and
** others only init time.
*************************************************************************
** CHANGES INFORMATION **
*************************
** REVISION: $Revision: 1.2 $
** WORKFILE: $Workfile: devlib.h $
** LOGINFO: $Log: D:/CPROG/MYDEV/DEVLIB/VCS/DEVLIB.H_V $
**
** Rev 1.2 17 Dec 1990 14:15:20 PAUL
** - Conversion to type definition rules of os2def.h.
** - If all parameters fit in registers then _fascall function.
** - Addition of EOI, RegisterStackUsage, SetIRQ and UnSetIRQ.
**
** Rev 1.1 03 Sep 1990 15:00:28 PAUL
** Addition of AllocPhys, FreePhys and GetDOSVar.
**
** Rev 1.0 14 Aug 1990 14:20:58 PAUL
** Initial revision.
*************************************************************************/
/* Direct hardware manipulation (dhdw) */
/* 001 */ USHORT _fastcall dev_disable(void);
/* 001 */ USHORT _fastcall dev_restore_int(USHORT flags);
/* Device driver help specific (dhlp) */
/* 006 */ USHORT dev_SemRequest(void _far *hsem, ULONG timeout);
/* 007 */ USHORT dev_SemClear(void _far *hsem);
/* 008 */ USHORT dev_SemHandle(void _far *phsem, int action);
/* 013 */ USHORT dev_Lock(SEL sel, USHORT flags, PULONG pHandle);
/* 014 */ USHORT _fastcall dev_Unlock(ULONG LockHandle);
/* 016 */ USHORT dev_VirtToPhys(void _far *ptr, PULONG paddr);
/* 018 */ USHORT dev_AllocPhys(ULONG cSize, USHORT pos, PULONG pPhys);
/* 019 */ USHORT _fastcall dev_FreePhys(ULONG phys);
/* 01B */ USHORT _fastcall dev_SetIRQ(USHORT IRQNum, void (_near *handler)(),
USHORT ShareFlag);
/* 01C */ void _fastcall dev_UnSetIRQ(USHORT IRQNum);
/* 024 */ USHORT dev_GetDOSVar(USHORT Variable, void _far *pFarPoint);
/* 027 */ USHORT dev_VerifyAccess(void _far *ptr, USHORT len, USHORT type);
/* 02D */ USHORT dev_AllocGDTSelector(PSEL psel, short nsel);
/* 02E */ USHORT dev_PhysToGDTSelector(ULONG phys, USHORT len, SEL sel);
/* 031 */ void _fastcall dev_EOI(USHORT IRQNum);
/* 03A */ USHORT _fastcall dev_RegisterStackUsage(void _near *pStackUse);
/* memory functions (dmem) */
/* 001 */ void _far *dev_memcpy(void _far *dest, void _far *src, unsigned count);
/* 002 */ void _far *dev_memset(void _far *dest, int c, unsigned count);
/* string functions (dstr) */
/* 001 */ unsigned dev_strlen(char _far *);
/* 002 */ int dev_strcmp(char _far *, char _far *);
/* 003 */ int dev_stricmp(char _far *, char _far *);
/* 004 */ char _far *dev_strcpy(char _far *dest, char _far *src);
/* 005 */ char _far *dev_strncpy(char _far *dest, char _far *src, unsigned count);
/* printf variants (dprt) */
/* 001 */ int dev_printf(const char _far *, ...);
/* 002 */ int dev_sprintf(char _far *, const char _far *, ...);
/* 100 */ unsigned format(char _far *dest, const char _far *fmt, char _far *args);
/* conversion functions (dcnv) */
/* 001 */ char _far * dev_ltoa(long, char _far *, int);
/* 001 */ char _far * dev_itoa(int, char _far *, int);
/* 001 */ char _far * dev_ultoa(unsigned long, char _far *, int);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -