44 typedef wfio_sint16_t wfio_dos_sword_t;
45 typedef wfio_uint16_t wfio_dos_uword_t;
46 typedef wfio_sint32_t wfio_dos_sdword_t;
47 typedef wfio_uint32_t wfio_dos_udword_t;
49 typedef enum wfio_dos_opendir_t {
56 typedef enum wfio_dos_share_t {
57 WFIO_DOS_SMODE_COMPAT,
59 WFIO_DOS_SMODE_RDONLY,
60 WFIO_DOS_SMODE_WRONLY,
64 typedef enum wfio_dos_fexist_t {
71 WFIO_DOS_NEXIST_CREAT = 0x10,
130 #ifdef WFIO_ENDIAN_HOST_IS_LIL 169 wfio_dos_uword_t resv0_:1;
170 wfio_dos_uword_t share:3;
171 wfio_dos_uword_t priv:1;
172 wfio_dos_uword_t resv1_:5;
173 wfio_dos_uword_t eret:1;
174 wfio_dos_uword_t acommit:1;
175 wfio_dos_uword_t resv2_:1;
177 wfio_dos_uword_t raw;
182 wfio_uint8_t rdonly:1;
183 wfio_uint8_t hidden:1;
184 wfio_uint8_t system:1;
185 wfio_uint8_t vlabel:1;
186 wfio_uint8_t subdir:1;
187 wfio_uint8_t archive:1;
188 wfio_uint8_t resv0_:1;
195 wfio_dos_uword_t exist:4;
196 wfio_dos_uword_t create:4;
614 wfio_dos_uword_t segment, wfio_dos_uword_t offset) {
619 #ifdef WFIO_COMPILER_DJGPP 626 return __dpmi_int(vector, (__dpmi_regs*) regs) != -1;
630 return __dpmi_int(vector, (__dpmi_regs*) regs) != -1;
633 #define WFIO_DOS_INT_INLINE_ 679 return wfio_dos_int(0x21, regs);
wfio_dos_udword_t edi
Synonymous with the 80386's edi register.
Definition: dos.h:216
wfio_dos_uword_t offset
This far pointer's offset.
Definition: dos.h:607
WFIO_ALWAYS_INLINE wfio_dos_farptr_t wfio_dos_farptr(wfio_dos_uword_t segment, wfio_dos_uword_t offset)
Construct a new far pointer.
Definition: dos.h:613
WFIO_DLL_FASTCALL int wfio_dos_open6C(const char *path, wfio_dos_open_t flags, int *error)
Open a new file handle by invoking DOS system call 0x3C.
wfio_uint8_t dlHi
Synonymous with the the third byte of the edx register.
Definition: dos.h:479
union wfio_dos_sversion_t wfio_dos_sversion_t
A DOS version broken out into its components.
wfio_dos_uword_t bpHi
The upper half of the ebp register.
Definition: dos.h:437
wfio_dos_uword_t axHi
The upper half of the eax register.
Definition: dos.h:384
wfio_uint8_t clHi
Synonymous with the the third byte of the ecx register.
Definition: dos.h:499
#define WFIO_C_BEGIN
Definition: host.h:477
wfio_dos_uword_t diHi
The upper half of the edi register.
Definition: dos.h:417
wfio_dos_udword_t res
Reserved by the system.
Definition: dos.h:231
wfio_dos_udword_t ebx
Synonymous with the 80386's ebx register.
Definition: dos.h:238
#define WFIO_DLL_FASTCALL
Shorthand for WFIO_DLL WFIO_FASTCALL.
Definition: host.h:425
wfio_uint8_t dh
Synonymous with the 8086's dh register.
Definition: dos.h:474
Open flags supplied to wfio_dos_open() or wfio_dos_openEx().
Definition: dos.h:163
wfio_dos_udword_t ebp
Synonymous with the 80386's ebp register.
Definition: dos.h:226
wfio_dos_uword_t ds
Synonymous with the 8086's ds register.
Definition: dos.h:271
wfio_dos_uword_t cx
Synonymous with the 8086's cx register.
Definition: dos.h:369
wfio_dos_uword_t siHi
The upper half of the esi register.
Definition: dos.h:327
wfio_dos_uword_t di
Synonymous with the 8086's di register.
Definition: dos.h:412
DOS version 1.25.
Definition: dos.h:93
wfio_dos_uword_t gs
Synonymous with the 80286's gs register.
Definition: dos.h:553
WFIO_DLL_FASTCALL wfio_openmode_t wfio_dos_openToWFIO(wfio_dos_open_t flags)
Convert a DOS open mode to a WFIO open mode.
wfio_dos_uword_t es
Synonymous with the 8086's es register.
Definition: dos.h:538
wfio_dos_uword_t fs
Synonymous with the 80286's fs register.
Definition: dos.h:276
DOS version 4.0.
Definition: dos.h:108
A register set corresponding to a DPMI interrupt call.
Definition: dos.h:581
wfio_dos_udword_t res
Reserved by the system.
Definition: dos.h:442
wfio_dos_uword_t fs
Synonymous with the 80286's fs register.
Definition: dos.h:548
#define WFIO_ALWAYS_INLINE
Mark this symbol to be forced inline.
Definition: host.h:447
wfio_uint8_t ah
Synonymous with the 8086's ah register.
Definition: dos.h:514
wfio_dos_uword_t cxHi
The upper half of the ecx register.
Definition: dos.h:374
wfio_dos_udword_t res
Reserved by the system.
Definition: dos.h:342
wfio_dos_uword_t flags
Synonymous with the 8086's flags register.
Definition: dos.h:531
wfio_dos_uword_t bp
Synonymous with the 8086's bp register.
Definition: dos.h:432
wfio_dos_udword_t eax
Synonymous with the 80386's ax register.
Definition: dos.h:253
DOS version 5.0.
Definition: dos.h:118
union wfio_dos_dpmi_regs_t wfio_dos_dpmi_regs_t
A register set corresponding to a DPMI interrupt call.
wfio_dos_dpmi_regsw_t w
Treat this register set as 16-bit registers.
Definition: dos.h:589
wfio_uint8_t dl
Synonymous with the 8086's dl register.
Definition: dos.h:469
wfio_dos_dpmi_regsd_t d
Treat this register set as 32-bit registers.
Definition: dos.h:585
wfio_dos_uword_t segment
This far pointer's segment.
Definition: dos.h:603
wfio_dos_uword_t siHi
The upper half of the esi register.
Definition: dos.h:427
WFIO_DLL_FASTCALL wfio_dos_version_t wfio_dos_version()
Obtain the current DOS version.
The DOS version of the host.
Definition: dos.h:83
wfio_uint8_t ch
Synonymous with the 8086's ah register.
Definition: dos.h:494
WFIO_DLL_FASTCALL int wfio_dos_openEx(const char *path, wfio_dos_open_t flags, wfio_dos_version_t ver, int *error)
Open a new file by invoking the appropriate DOS system call and by specifying the version...
wfio_uint8_t bhHi
Synonymous with the the fourth byte of the ebx register.
Definition: dos.h:464
wfio_dos_uword_t edx
Synonymous with the 80386's edx register.
Definition: dos.h:243
wfio_dos_uword_t ip
Synonymous with the 8086's ip register.
Definition: dos.h:560
wfio_dos_uword_t sp
Synonymous with the 8086's cs register.
Definition: dos.h:298
DOS version 2.0.
Definition: dos.h:98
wfio_uint8_t blHi
Synonymous with the the third byte of the ebx register.
Definition: dos.h:459
WFIO_ALWAYS_INLINE int wfio_dos_open(const char *path, wfio_dos_open_t flags, int *error)
Open a new file by invoking the appropriate DOS system call and by specifying the version...
Definition: dos.h:786
wfio_dos_uword_t ds
Synonymous with the 8086's ds register.
Definition: dos.h:543
wfio_dos_udword_t esi
Synonymous with the 80386's esi register.
Definition: dos.h:221
DOS version 1.0.
Definition: dos.h:88
A DOS version broken out into its components.
Definition: dos.h:124
WFIO_ALWAYS_INLINE int wfio_dos_syscall(wfio_dos_regs_t *regs)
Invoke a DOS system call.
Definition: dos.h:678
wfio_dos_uword_t si
Synonymous with the 8086's si register.
Definition: dos.h:322
wfio_uint8_t alHi
Synonymous with the the third byte of the eax register.
Definition: dos.h:519
#define WFIO_C_END
Definition: host.h:485
struct wfio_dos_sversion_t::@16 u8
The DOS version split into major and minor versions.
wfio_uint8_t ahHi
Synonymous with the the fourth byte of the eax register.
Definition: dos.h:524
wfio_uint8_t al
Synonymous with the 8086's al register.
Definition: dos.h:509
wfio_dos_uword_t bpHi
The upper half of the ebp register.
Definition: dos.h:337
The DOS version is not known.
Definition: dos.h:78
wfio_dos_uword_t di
Synonymous with the 8086's di register.
Definition: dos.h:312
wfio_dos_uword_t flags
Synonymous with the 8086's flags register.
Definition: dos.h:391
wfio_dos_uword_t dx
Synonymous with the 8086's dx register.
Definition: dos.h:359
wfio_uint8_t dhHi
Synonymous with the the fourth byte of the edx register.
Definition: dos.h:484
wfio_dos_udword_t ecx
Synonymous with the 80386's ecx register.
Definition: dos.h:248
WFIO_DLL_FASTCALL int wfio_dos_open3D(const char *path, wfio_dos_openflags_t flags, int *error)
Open a new file handle by invoking DOS system call 0x3D.
wfio_dos_uword_t mode
The mode to open the file with.
Definition: dos.h:168
wfio_dos_uword_t u16
The 16-bit word corresponding to the version.
Definition: dos.h:152
wfio_dos_uword_t cs
Synonymous with the 8086's cs register.
Definition: dos.h:293
wfio_dos_uword_t flags
Synonymous with the 8086's flags register.
Definition: dos.h:261
A far pointer.
Definition: dos.h:599
wfio_uint8_t bh
Synonymous with the 8086's bh register.
Definition: dos.h:454
wfio_dos_uword_t gs
Synonymous with the 80286's gs register.
Definition: dos.h:281
wfio_dos_uword_t ax
Synonymous with the 8086's ax register.
Definition: dos.h:379
wfio_dos_uword_t ss
Synonymous with the 8086's ss register.
Definition: dos.h:575
wfio_uint8_t cl
Synonymous with the 8086's al register.
Definition: dos.h:489
wfio_uint8_t bl
Synonymous with the 8086's bl register.
Definition: dos.h:449
struct wfio_dos_farptr_t wfio_dos_farptr_t
A far pointer.
wfio_uint8_t chHi
Synonymous with the the fourth byte of the ecx register.
Definition: dos.h:504
union wfio_dos_openflags_t wfio_dos_openflags_t
Open flags supplied to wfio_dos_open() or wfio_dos_openEx().
wfio_dos_uword_t ip
Synonymous with the 8086's ip register.
Definition: dos.h:288
wfio_dos_uword_t bxHi
The upper half of the ebx register.
Definition: dos.h:354
wfio_dos_uword_t es
Synonymous with the 8086's es register.
Definition: dos.h:266
DOS version 3.0.
Definition: dos.h:103
wfio_dos_uword_t cs
Synonymous with the 8086's cs register.
Definition: dos.h:565
DOS version 4.0.
Definition: dos.h:113
wfio_dos_uword_t ss
Synonymous with the 8086's ss register.
Definition: dos.h:303
wfio_dos_uword_t dxHi
The upper half of the edx register.
Definition: dos.h:364
wfio_dos_dpmi_regsb_t b
Treat this register set as 8-bit registers.
Definition: dos.h:593
wfio_dos_uword_t wfio_dos_version_t
The integral type of a dos version.
Definition: dos.h:158
WFIO_DLL_FASTCALL int wfio_dos_open3C(const char *path, wfio_dos_fileattr_t attrs, int *error)
Open a new file handle by invoking DOS system call 0x3C.
wfio_dos_uword_t si
Synonymous with the 8086's si register.
Definition: dos.h:422
wfio_dos_uword_t diHi
The upper half of the edi register.
Definition: dos.h:317
wfio_dos_uword_t bp
Synonymous with the 8086's bp register.
Definition: dos.h:332
wfio_dos_uword_t bx
Synonymous with the 8086's bx register.
Definition: dos.h:349
int wfio_openmode_t
The type corresponding to an openmode.
Definition: iotype.h:103
wfio_dos_uword_t sp
Synonymous with the 8086's cs register.
Definition: dos.h:570