"Fossies" - the Fresh Open Source Software Archive

Member "dosemu-1.4.0/src/dosext/dpmi/msdos.h" (4 May 2007, 1711 Bytes) of package /linux/misc/old/dosemu-1.4.0.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "msdos.h" see the Fossies "Dox" file reference documentation.

    1 /* 
    2  * (C) Copyright 1992, ..., 2007 the "DOSEMU-Development-Team".
    3  *
    4  * for details see file COPYING.DOSEMU in the DOSEMU distribution
    5  */
    6 
    7 /*  MS-DOS API translator for DOSEMU\'s DPMI Server
    8  *
    9  * DANG_BEGIN_MODULE msdos.h
   10  *
   11  * REMARK
   12  * MS-DOS API translator allows DPMI programs to call DOS service directly
   13  * in protected mode.
   14  *
   15  * /REMARK
   16  * DANG_END_MODULE
   17  *
   18  * First Attempted by Dong Liu,  dliu@rice.njit.edu
   19  *
   20  */
   21 
   22 #ifndef __MSDOS_H__
   23 #define __MSDOS_H__
   24 
   25 #define MSDOS_MAX_MEM_ALLOCS 1024
   26 
   27 struct msdos_struct {
   28   int is_32;
   29   struct pmaddr_s mouseCallBack, PS2mouseCallBack; /* user\'s mouse routine */
   30   far_t XMS_call;
   31   /* used when passing a DTA higher than 1MB */
   32   unsigned short user_dta_sel;
   33   unsigned long user_dta_off;
   34   unsigned short user_psp_sel;
   35   unsigned short current_psp;
   36   unsigned short lowmem_seg;
   37   char ems_map_buffer[PAGE_MAP_SIZE];
   38   int ems_frame_mapped;
   39   dpmi_pm_block mem_map[MSDOS_MAX_MEM_ALLOCS];
   40 };
   41 
   42 extern void msdos_init(int is_32, unsigned short mseg,
   43     unsigned short psp);
   44 extern void msdos_done(void);
   45 extern int msdos_get_lowmem_size(void);
   46 extern int msdos_pre_extender(struct sigcontext_struct *scp, int intr);
   47 extern int msdos_post_extender(struct sigcontext_struct *scp, int intr);
   48 extern int msdos_fault(struct sigcontext_struct *scp);
   49 extern int msdos_pre_rm(struct sigcontext_struct *scp);
   50 extern void msdos_post_rm(struct sigcontext_struct *scp);
   51 extern int msdos_pre_pm(struct sigcontext_struct *scp);
   52 extern void msdos_post_pm(struct sigcontext_struct *scp);
   53 
   54 #define MSDOS_DONE 1
   55 #define MSDOS_ALT_ENT 2
   56 
   57 #define DTA_Para_ADD 0
   58 #define DTA_Para_SIZE 8
   59 #define EXEC_Para_ADD (DTA_Para_ADD + DTA_Para_SIZE)
   60 #define EXEC_Para_SIZE 30
   61 
   62 #endif