6 #include <sys/nearptr.h>
8 #define virt_to_phys(v) ((v) + __djgpp_base_address)
9 #define phys_to_virt(p) ((p) - __djgpp_base_address)
11 #else /* not djgpp (basically watcom) */
13 #define virt_to_phys(v) (v)
14 #define phys_to_virt(p) (p)
16 #endif /* __DJGPP__ */
21 #pragma pack (push, 1)
23 uint32_t edi, esi, ebp;
25 uint32_t ebx, edx, ecx, eax;
27 uint16_t es, ds, fs, gs;
28 uint16_t ip, cs, sp, ss;
32 uint16_t dpmi_alloc(unsigned int par, uint16_t *sel);
33 void dpmi_free(uint16_t sel);
34 void dpmi_int(int inum, struct dpmi_regs *regs);
35 void *dpmi_mmap(uint32_t phys_addr, unsigned int size);
36 void dpmi_munmap(void *addr);
39 #pragma aux dpmi_alloc = \
43 "jnc alloc_skip_err" \
50 #pragma aux dpmi_free = \
56 #pragma aux dpmi_int = \
63 #pragma aux dpmi_mmap = \
81 #pragma aux dpmi_munmap = \
88 #endif /* __WATCOMC__ */
91 #define dpmi_int(inum, regs) __dpmi_int((inum), (__dpmi_regs*)(regs))