deepstone
annotate src/dpmi.h @ 37:e5e01cd2c995
changed the VC project file to use the non-dll versions of msvcrt
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 23 Sep 2013 08:06:04 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@21 | 1 #ifndef DPMI_H_ |
nuclear@21 | 2 #define DPMI_H_ |
nuclear@21 | 3 |
nuclear@21 | 4 #include "inttypes.h" |
nuclear@21 | 5 |
nuclear@21 | 6 struct dpmi_real_regs { |
nuclear@21 | 7 uint32_t edi, esi, ebp; |
nuclear@21 | 8 uint32_t reserved; |
nuclear@21 | 9 uint32_t ebx, edx, ecx, eax; |
nuclear@21 | 10 uint16_t flags; |
nuclear@21 | 11 uint16_t es, ds, fs, gs; |
nuclear@21 | 12 uint16_t ip, cs, sp, ss; |
nuclear@21 | 13 }; |
nuclear@21 | 14 |
nuclear@21 | 15 unsigned short dpmi_alloc(unsigned int par); |
nuclear@21 | 16 #pragma aux dpmi_alloc = \ |
nuclear@21 | 17 "mov eax, 0x100" \ |
nuclear@21 | 18 "int 0x31" \ |
nuclear@21 | 19 value[ax] parm[ebx]; |
nuclear@21 | 20 |
nuclear@21 | 21 void dpmi_real_int(int inum, struct dpmi_real_regs *regs); |
nuclear@21 | 22 |
nuclear@21 | 23 void *dpmi_mmap(uint32_t phys_addr, unsigned int size); |
nuclear@21 | 24 void dpmi_munmap(void *addr); |
nuclear@21 | 25 |
nuclear@21 | 26 #endif /* DPMI_H_ */ |