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__ */
20 #pragma pack (push, 1)
22 uint32_t edi, esi, ebp;
24 uint32_t ebx, edx, ecx, eax;
26 uint16_t es, ds, fs, gs;
27 uint16_t ip, cs, sp, ss;
31 uint16_t dpmi_alloc(unsigned int par, uint16_t *sel);
32 void dpmi_free(uint16_t sel);
33 void dpmi_int(int inum, struct dpmi_regs *regs);
34 void *dpmi_mmap(uint32_t phys_addr, unsigned int size);
35 void dpmi_munmap(void *addr);
38 #pragma aux dpmi_alloc = \
42 "jnc alloc_skip_err" \
49 #pragma aux dpmi_free = \
55 #pragma aux dpmi_int = \
62 #pragma aux dpmi_mmap = \
80 #pragma aux dpmi_munmap = \
87 #endif /* __WATCOMC__ */
90 #define dpmi_int(inum, regs) __dpmi_int((inum), (__dpmi_regs*)(regs))