*/
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <inttypes.h>
#include <unistd.h>
#include <fcntl.h>
//#define SIGTEST
+#undef __syscall_return
+#define __syscall_return(type, res) \
+do { \
+ return (type) (res); \
+} while (0)
+
_syscall2(int, vm86, int, func, struct vm86plus_struct *, v86)
#define COM_BASE_ADDR 0x10100
r->es = seg;
r->fs = seg;
r->gs = seg;
- r->eflags = (IF_MASK | IOPL_MASK);
+ r->eflags = VIF_MASK;
/* put return code */
set_bit((uint8_t *)&ctx.int_revectored, 0x21);