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;
43 uint16_t dpmi_alloc(unsigned int par, uint16_t *sel);
44 void dpmi_free(uint16_t sel);
45 void dpmi_int(int inum, struct dpmi_regs *regs);
46 void *dpmi_mmap(uint32_t phys_addr, unsigned int size);
47 void dpmi_munmap(void *addr);
50 #pragma aux dpmi_alloc = \
54 "jnc alloc_skip_err" \
61 #pragma aux dpmi_free = \
67 #pragma aux dpmi_int = \
74 #pragma aux dpmi_mmap = \
92 #pragma aux dpmi_munmap = \
99 #endif /* __WATCOMC__ */
102 #define dpmi_int(inum, regs) __dpmi_int((inum), (__dpmi_regs*)(regs))