home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************/
- /* mpdos.h -- EXTENSIONS TO TURBO C / MICROSOFT C dos.h INCLUDE (INTERFACE)*/
- /* Created: 8/1/87 Release: 0.7 Version: 06/27/88 */
- /****************************************************************************
- (c) Copyright 1987 by Michael Benjamin Parker (USA SS# 557-49-4130)
-
- All Rights Reserved unless specified in the following include files: */
- #include "mptsk.cpy" /*
-
- DO NOT REMOVE OR ALTER THIS NOTICE AND ITS PROVISIONS.
- ****************************************************************************/
- /* OVERVIEW:
-
- These are a set of extensions to the standard dos.h include file of
- Turbo C and Microsoft C. Extensions implemented include:
-
- A structure for holding the Intel 8088 flag register.
-
- A procedure for retrieving the Intel 8088 flags.
-
- Macros to get and set the current stack pointer (Turbo C only). */
- /****************************************************************************/
- /****************************************************************************/
- /****************************************************************************/
- #ifndef MPDOS_H
- #define MPDOS_H
-
- #ifndef DOS_H
- #define DOS_H
- #include <dos.h>
- #endif /* DOS_H */
- /****************************************************************************/
- typedef struct {
- unsigned CF: 1;
- unsigned : 1;
- unsigned PF: 1;
- unsigned : 1;
- unsigned AF: 1;
- unsigned : 1;
- unsigned ZF: 1;
- unsigned SF: 1;
- unsigned TF: 1;
- unsigned IF: 1;
- unsigned DF: 1;
- unsigned OF: 1;
- unsigned : 4;
- } _FLAGS;
- /****************************************************************************/
- typedef short _Cdecl (far *MPDOS_FLAGREAD)(void);
- extern MPDOS_FLAGREAD mpdos_flagread;
- #define _FLAG (mpdos_flagread())
- /****************************************************************************/
- #define _FLAG_CF (0x0001)
- #define _FLAG_PF (0x0004)
- #define _FLAG_AF (0x0010)
- #define _FLAG_ZF (0x0040)
- #define _FLAG_SF (0x0080)
- #define _FLAG_TF (0x0100)
- #define _FLAG_IF (0x0200)
- #define _FLAG_DF (0x0400)
- #define _FLAG_OF (0x0800)
- /****************************************************************************/
- /****************************************************************************/
- #ifdef __TURBOC__
-
- /* STACK COMMANDS TAKE AND GET HUDGE POINTERS */
- #define getstackptr() (MK_FP(_SS,_SP))
- #define setstackptr(ptr) \
- ptr+= 0; \
- _SP= FP_OFF(ptr)-0x0010; \
- _SS= FP_SEG(ptr)+0x0001
-
- #endif
- /****************************************************************************/
- /****************************************************************************/
- #define mpdos_vect(intr_no,new_interrupt) \
- getvect(intr_no); \
- setvect(intr_no,new_interrupt)
- /****************************************************************************/
- /****************************************************************************/
- #endif /* MPDOS_H */