⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bsedos.mh

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 MH
📖 第 1 页 / 共 2 页
字号:
USHORT APIENTRY DosFreeSeg(SEL);
USHORT APIENTRY DosGetHugeShift(PUSHORT);
USHORT APIENTRY DosGetSeg(SEL);
USHORT APIENTRY DosGetShrSeg(PSZ,PSEL);
USHORT APIENTRY DosGiveSeg(SEL,PID,PSEL);
USHORT APIENTRY DosLockSeg(SEL);
USHORT APIENTRY DosMemAvail(PULONG);
USHORT APIENTRY DosReallocHuge(USHORT,USHORT,SEL);
USHORT APIENTRY DosReallocSeg(USHORT,SEL);
USHORT APIENTRY DosSizeSeg(SEL,PULONG);
USHORT APIENTRY DosSubAlloc(SEL,PUSHORT,USHORT);
USHORT APIENTRY DosSubFree(SEL,USHORT,USHORT);
USHORT APIENTRY DosSubSet(SEL,USHORT,USHORT);
USHORT APIENTRY DosUnlockSeg(SEL);

#endif

#ifdef INCL_DOSMODULEMGR

USHORT APIENTRY DosFreeModule(HMODULE);
USHORT APIENTRY DosGetModHandle(PSZ,PHMODULE);
USHORT APIENTRY DosGetModName(HMODULE,USHORT,PCHAR);
USHORT APIENTRY DosGetProcAddr(HMODULE,PSZ,PFN FAR *);
USHORT APIENTRY DosLoadModule(PSZ,USHORT,PSZ,PHMODULE);

#endif

#ifdef INCL_DOSNMPIPES

typedef SHANDLE     HPIPE;
typedef HPIPE FAR   *PHPIPE;

USHORT APIENTRY DosCallNmPipe(PSZ,PBYTE,USHORT,PBYTE,USHORT,PUSHORT,ULONG);
USHORT APIENTRY DosConnectNmPipe(HPIPE);
USHORT APIENTRY DosDisConnectNmPipe(HPIPE);
USHORT APIENTRY DosMakeNmPipe(PSZ,PHPIPE,USHORT,USHORT,USHORT,USHORT,ULONG);
USHORT APIENTRY DosPeekNmPipe(HPIPE,PBYTE,USHORT,PUSHORT,PUSHORT,PUSHORT);
USHORT APIENTRY DosQNmPHandState(HPIPE,PUSHORT);
USHORT APIENTRY DosQNmPipeInfo(HPIPE,USHORT,PBYTE,USHORT);
USHORT APIENTRY DosQNmPipeSemState(HSEM,PBYTE,USHORT);
USHORT APIENTRY DosSetNmPHandState(HPIPE,USHORT);
USHORT APIENTRY DosSetNmPipeSem(HPIPE,HSEM,USHORT);
USHORT APIENTRY DosTransactNmPipe(HPIPE,PBYTE,USHORT,PBYTE,USHORT,PUSHORT);
USHORT APIENTRY DosWaitNmPipe(PSZ,ULONG);

#endif

#ifdef INCL_DOSQUEUES

typedef SHANDLE     HQUEUE;
typedef HQUEUE FAR  *PHQUEUE;

USHORT APIENTRY DosCloseQueue(HQUEUE);
USHORT APIENTRY DosCreateQueue(PHQUEUE,USHORT,PSZ);
USHORT APIENTRY DosMakePipe(PHFILE,PHFILE,USHORT);
USHORT APIENTRY DosOpenQueue(PUSHORT,PHQUEUE,PSZ);
USHORT APIENTRY DosPeekQueue(HQUEUE,PULONG,PUSHORT,PULONG,PUSHORT,UCHAR,PBYTE,ULONG);
USHORT APIENTRY DosPurgeQueue(HQUEUE);
USHORT APIENTRY DosQueryQueue(HQUEUE,PUSHORT);
USHORT APIENTRY DosReadQueue(HQUEUE,PULONG,PUSHORT,PULONG,USHORT,UCHAR,PBYTE,HSEM);
USHORT APIENTRY DosWriteQueue(HQUEUE,USHORT,USHORT,PBYTE,UCHAR);

#endif

#ifdef INCL_DOSSEMAPHORES

#define SEM_INDEFINITE_WAIT  (-1L)
#define SEM_IMMEDIATE_RETURN   0

typedef LHANDLE     HSYSSEM;
typedef HSYSSEM FAR *PHSYSSEM;

typedef struct _DOSFSRSEM {
    USHORT cb;
    PID    pid;
    TID    tid;
    USHORT cUsage;
    USHORT client;
    ULONG  sem;
} DOSFSRSEM, FAR *PDOSFSRSEM;

typedef struct _MUXSEM {
    USHORT zero;
    HSEM   hsem;
} MUXSEM, FAR *PMUXSEM;

typedef struct _MUXSEMLIST {
    USHORT  cmxs;
    MUXSEM  amxs[16];
} MUXSEMLIST, FAR *PMUXSEMLIST;

USHORT APIENTRY DosCloseSem(HSEM);
USHORT APIENTRY DosCreateSem(USHORT,PHSYSSEM,PSZ);
USHORT APIENTRY DosFSRamSemClear(PDOSFSRSEM);
USHORT APIENTRY DosFSRamSemRequest(PDOSFSRSEM,LONG);
USHORT APIENTRY DosMuxSemWait(PUSHORT,PVOID,LONG);
USHORT APIENTRY DosOpenSem(PHSEM,PSZ);
USHORT APIENTRY DosSemClear(HSEM);
USHORT APIENTRY DosSemRequest(HSEM,LONG);
USHORT APIENTRY DosSemSet(HSEM);
USHORT APIENTRY DosSemSetWait(HSEM,LONG);
USHORT APIENTRY DosSemWait(HSEM,LONG);

#endif

#ifdef INCL_DOSMONITORS

typedef SHANDLE       HMONITOR;
typedef HMONITOR FAR  *PHMONITOR;

USHORT APIENTRY DosMonClose(HMONITOR);
USHORT APIENTRY DosMonOpen(PSZ,PHMONITOR);
USHORT APIENTRY DosMonRead(PBYTE,USHORT,PBYTE,PUSHORT);
USHORT APIENTRY DosMonReg(HMONITOR,PBYTE,PBYTE,USHORT,USHORT);
USHORT APIENTRY DosMonWrite(PBYTE,PBYTE,USHORT);

#endif

#ifdef INCL_DOSINFOSEG

#define PT_FULLSCREEN    0
#define PT_REALMODE      1
#define PT_WINDOWABLEVIO 2
#define PT_PM            3
#define PT_DETACHED      4

#define PS_EXITLIST 1

#define MAKEPGINFOSEG(sel) ((PGINFOSEG)MAKEP(sel, 0))
#define MAKEPLINFOSEG(sel) ((PLINFOSEG)MAKEP(sel, 0))

typedef struct _GINFOSEG {
    ULONG   time;
    ULONG   msecs;
    UCHAR   hour;
    UCHAR   minutes;
    UCHAR   seconds;
    UCHAR   hundredths;    USHORT  timezone;
    USHORT  cusecTimerInterval;
    UCHAR   day;
    UCHAR   month;
    USHORT  year;
    UCHAR   weekday;
    UCHAR   uchMajorVersion;
    UCHAR   uchMinorVersion;
    UCHAR   chRevisionLetter;
    UCHAR   sgCurrent;
    UCHAR   sgMax;
    UCHAR   cHugeShift;
    UCHAR   fProtectModeOnly;
    USHORT  pidForeground;
    UCHAR   fDynamicSched;
    UCHAR   csecMaxWait;
    USHORT  cmsecMinSlice;
    USHORT  cmsecMaxSlice;
    USHORT  bootdrive;
    UCHAR   amecRAS[32];
    UCHAR   csgWindowableVioMax;
    UCHAR   csgPMMax;
} GINFOSEG, FAR *PGINFOSEG;

typedef struct _LINFOSEG {
    PID     pidCurrent;
    PID     pidParent;
    USHORT  prtyCurrent;
    TID     tidCurrent;
    USHORT  sgCurrent;
    UCHAR   rfProcStatus;
    UCHAR   dummy1;
    BOOL    fForeground;
    UCHAR   typeProcess;
    UCHAR   dummy2;
    SEL     selEnvironment;
    USHORT  offCmdLine;
    USHORT  cbDataSegment;
    USHORT  cbStack;
    USHORT  cbHeap;
    HMODULE hmod;
    SEL     selDS;
} LINFOSEG, FAR *PLINFOSEG;

USHORT APIENTRY DosGetInfoSeg(PSEL,PSEL);

#endif

#ifdef INCL_DOSNLS

typedef struct _COUNTRYCODE {
    USHORT country;
    USHORT codepage;
} COUNTRYCODE, FAR *PCOUNTRYCODE;

typedef struct _COUNTRYINFO {
    USHORT country;
    USHORT codepage;
    USHORT fsDateFmt;
    CHAR   szCurrency[5];
    CHAR   szThousandsSeparator[2];
    CHAR   szDecimal[2];
    CHAR   szDateSeparator[2];
    CHAR   szTimeSeparator[2];
    UCHAR  fsCurrencyFmt;
    UCHAR  cDecimalPlace;
    UCHAR  fsTimeFmt;
    USHORT abReserved1[2];
    CHAR   szDataSeparator[2];
    USHORT abReserved2[5];
} COUNTRYINFO, FAR *PCOUNTRYINFO;

USHORT APIENTRY DosCaseMap(USHORT,PCOUNTRYCODE,PCHAR);
USHORT APIENTRY DosGetCollate(USHORT,PCOUNTRYCODE,PCHAR,PUSHORT);
USHORT APIENTRY DosGetCp(USHORT,PUSHORT,PUSHORT);
USHORT APIENTRY DosGetCtryInfo(USHORT,PCOUNTRYCODE,PCOUNTRYINFO,PUSHORT);
USHORT APIENTRY DosGetDBCSEv(USHORT,PCOUNTRYCODE,PCHAR);
USHORT APIENTRY DosSetCp(USHORT,USHORT);
USHORT APIENTRY DosSetProcCp(USHORT,USHORT);

#endif

#ifdef INCL_DOSSIGNALS

#define SIG_CTRLC        1
#define SIG_BROKENPIPE   2
#define SIG_KILLPROCESS  3
#define SIG_CTRLBREAK    4
#define SIG_PFLG_A       5
#define SIG_PFLG_B       6
#define SIG_PFLG_C       7
#define SIG_CSIGNALS     8

#define PFLG_A           0
#define PFLG_B           1
#define PFLG_C           2

#define SIGA_KILL        0
#define SIGA_IGNORE      1
#define SIGA_ACCEPT      2
#define SIGA_ERROR       3
#define SIGA_ACKNOWLEDGE 4

#define HLDSIG_ENABLE    0
#define HLDSIG_DISABLE   1

#define FLGP_SUBTREE     0
#define FLGP_PID         1

typedef VOID (PASCAL FAR *PFNSIGHANDLER)(USHORT,USHORT);

USHORT APIENTRY DosFlagProcess(PID,USHORT,USHORT,USHORT);
USHORT APIENTRY DosHoldSignal(USHORT);
USHORT APIENTRY DosSendSignal(USHORT,USHORT);
USHORT APIENTRY DosSetSigHandler(PFNSIGHANDLER,PFNSIGHANDLER FAR *,PUSHORT,USHORT,USHORT);

#endif

#ifdef INCL_DOSRESOURCES

USHORT APIENTRY DosFreeResource(PBYTE);
USHORT APIENTRY DosGetResource(HMODULE,USHORT,USHORT,PSEL);
USHORT APIENTRY DosGetResource2(HMODULE,USHORT,USHORT,PULONG);

#endif

#if (defined(INCL_DOSDATETIME) || !defined(INCL_NOCOMMON))

typedef struct _DATETIME {
    UCHAR   hours;
    UCHAR   minutes;
    UCHAR   seconds;
    UCHAR   hundredths;
    UCHAR   day;
    UCHAR   month;
    USHORT  year;
    SHORT   timezone;
    UCHAR   weekday;
} DATETIME, FAR *PDATETIME;

USHORT APIENTRY DosGetDateTime(PDATETIME);
USHORT APIENTRY DosSetDateTime(PDATETIME);

#endif

#ifdef INCL_DOSDATETIME

typedef SHANDLE     HTIMER;
typedef HTIMER FAR  *PHTIMER;

USHORT APIENTRY DosTimerAsync(ULONG,HSEM,PHTIMER);
USHORT APIENTRY DosTimerStart(ULONG,HSEM,PHTIMER);
USHORT APIENTRY DosTimerStop(HTIMER);

#endif

#ifdef INCL_DOSMISC

USHORT APIENTRY DosErrClass(USHORT,PUSHORT,PUSHORT,PUSHORT);
USHORT APIENTRY DosError(USHORT);
USHORT APIENTRY DosGetEnv(PUSHORT,PUSHORT);
USHORT APIENTRY DosGetMachineMode(PBYTE);
USHORT APIENTRY DosGetMessage(PCHAR FAR *,USHORT,PCHAR,USHORT,USHORT,PSZ,PUSHORT);
USHORT APIENTRY DosGetVersion(PUSHORT);
USHORT APIENTRY DosInsMessage(PCHAR FAR *,USHORT,PSZ,USHORT,PCHAR,USHORT,PUSHORT);
USHORT APIENTRY DosPutMessage(USHORT,USHORT,PCHAR);
USHORT APIENTRY DosPtrace(PBYTE);
USHORT APIENTRY DosQSysInfo(USHORT,PBYTE,USHORT);
USHORT APIENTRY DosScanEnv(PSZ,PSZ FAR *);
USHORT APIENTRY DosSearchPath(USHORT,PSZ,PSZ,PBYTE,USHORT);
USHORT APIENTRY DosSetVec(USHORT,PFN,PFN FAR *);

#endif

#ifdef INCL_DOSSESMGR

typedef struct _STATUSDATA {
  USHORT Length;
  USHORT SelectInd;
  USHORT BondInd;
} STATUSDATA, FAR *PSTATUSDATA;

typedef struct _STARTDATA {
    USHORT Length;
    USHORT Related;
    USHORT FgBg;
    USHORT TraceOpt;
    PSZ    PgmTitle;
    PSZ    PgmName;
    PBYTE  PgmInputs;
    PBYTE  TermQ;
    PBYTE  Environment;
    USHORT InheritOpt;
    USHORT SessionType;
    PSZ    IconFile;
    ULONG  PgmHandle;
    USHORT PgmControl;
    USHORT InitXPos;
    USHORT InitYPos;
    USHORT InitXSize;
    USHORT InitYSize;
} STARTDATA, FAR *PSTARTDATA;

USHORT APIENTRY DosQAppType(PSZ,PUSHORT);
USHORT APIENTRY DosSelectSession(USHORT,ULONG);
USHORT APIENTRY DosSetSession(USHORT,PSTATUSDATA);
USHORT APIENTRY DosStartSession(PSTARTDATA,PUSHORT,PUSHORT);
USHORT APIENTRY DosStopSession(USHORT,USHORT,ULONG);

#endif

#ifdef INCL_DOSDEVICES

VOID   APIENTRY DosCallback(PFN);
USHORT APIENTRY DosCLIAccess(VOID);
USHORT APIENTRY DosDevConfig(PVOID,USHORT,USHORT);
USHORT APIENTRY DosDevIOCtl(PVOID,PVOID,USHORT,USHORT,HFILE);
USHORT APIENTRY DosDevIOCtl2(PVOID,USHORT,PVOID,USHORT,USHORT,USHORT,HFILE);
USHORT APIENTRY DosPhysicalDisk(USHORT,PBYTE,USHORT,PBYTE,USHORT);
USHORT APIENTRY DosPortAccess(USHORT,USHORT,USHORT,USHORT);
USHORT APIENTRY DosR2StackRealloc(USHORT);

#endif

:include cplusepi.sp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -