nuclear@0: #ifndef DPMI_H_
nuclear@0: #define DPMI_H_
nuclear@0: 
nuclear@0: #include "inttypes.h"
nuclear@0: 
nuclear@0: struct dpmi_real_regs {
nuclear@0: 	uint32_t edi, esi, ebp;
nuclear@0: 	uint32_t reserved;
nuclear@0: 	uint32_t ebx, edx, ecx, eax;
nuclear@0: 	uint16_t flags;
nuclear@0: 	uint16_t es, ds, fs, gs;
nuclear@0: 	uint16_t ip, cs, sp, ss;
nuclear@0: };
nuclear@0: 
nuclear@0: unsigned short dpmi_alloc(unsigned int par);
nuclear@0: #pragma aux dpmi_alloc = \
nuclear@0: 		"mov eax, 0x100" \
nuclear@0: 		"int 0x31" \
nuclear@0: 		value[ax] parm[ebx];
nuclear@0: 
nuclear@0: void dpmi_real_int(int inum, struct dpmi_real_regs *regs);
nuclear@0: 
nuclear@0: void *dpmi_mmap(uint32_t phys_addr, unsigned int size);
nuclear@0: void dpmi_munmap(void *addr);
nuclear@0: 
nuclear@0: #endif	/* DPMI_H_ */