rayzor

diff src/dpmi.h @ 0:2a5340a6eee4

rayzor first commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Apr 2014 08:46:27 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/dpmi.h	Sat Apr 05 08:46:27 2014 +0300
     1.3 @@ -0,0 +1,26 @@
     1.4 +#ifndef DPMI_H_
     1.5 +#define DPMI_H_
     1.6 +
     1.7 +#include "inttypes.h"
     1.8 +
     1.9 +struct dpmi_real_regs {
    1.10 +	uint32_t edi, esi, ebp;
    1.11 +	uint32_t reserved;
    1.12 +	uint32_t ebx, edx, ecx, eax;
    1.13 +	uint16_t flags;
    1.14 +	uint16_t es, ds, fs, gs;
    1.15 +	uint16_t ip, cs, sp, ss;
    1.16 +};
    1.17 +
    1.18 +unsigned short dpmi_alloc(unsigned int par);
    1.19 +#pragma aux dpmi_alloc = \
    1.20 +		"mov eax, 0x100" \
    1.21 +		"int 0x31" \
    1.22 +		value[ax] parm[ebx];
    1.23 +
    1.24 +void dpmi_real_int(int inum, struct dpmi_real_regs *regs);
    1.25 +
    1.26 +void *dpmi_mmap(uint32_t phys_addr, unsigned int size);
    1.27 +void dpmi_munmap(void *addr);
    1.28 +
    1.29 +#endif	/* DPMI_H_ */