3 #include <sys/nearptr.h>
7 uint16_t dpmi_alloc(unsigned int par, uint16_t *sel)
10 uint16_t seg = __dpmi_allocate_dos_memory(par, &tmp);
15 void dpmi_free(uint16_t sel)
17 __dpmi_free_dos_memory(sel);
20 void *dpmi_mmap(uint32_t phys_addr, unsigned int size)
23 mem.address = phys_addr;
25 __dpmi_physical_address_mapping(&mem);
26 return (void*)(mem.address - __djgpp_base_address);
29 void dpmi_munmap(void *addr)
32 mem.address = (uint32_t)addr + __djgpp_base_address;
33 __dpmi_free_physical_address_mapping(&mem);
35 #endif /* __DJGPP__ */