[SOFT386]
[reactos.git] / include / reactos / libs / soft386 / soft386.h
index 21b6171..4e9bd0b 100644 (file)
@@ -1,9 +1,22 @@
 /*
- * COPYRIGHT:       GPL - See COPYING in the top level directory
- * PROJECT:         386/486 CPU Emulation Library
- * FILE:            soft386.h
- * PURPOSE:         Header file for Soft386.
- * PROGRAMMERS:     Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
+ * Soft386 386/486 CPU Emulation Library
+ * soft386.h
+ *
+ * Copyright (C) 2013 Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
 #ifndef _SOFT386_H_
@@ -215,6 +228,19 @@ typedef struct
     ULONG BaseHigh      : 8;
 } SOFT386_GDT_ENTRY, *PSOFT386_GDT_ENTRY;
 
+typedef struct
+{
+    ULONG Offset : 16;
+    ULONG Selector : 16;
+    ULONG ParamCount : 5;
+    ULONG Reserved : 3;
+    ULONG Type : 4;
+    ULONG SystemType : 1;
+    ULONG Dpl : 2;
+    ULONG Present : 1;
+    ULONG OffsetHigh : 16;
+} SOFT386_CALL_GATE, *PSOFT386_CALL_GATE;
+
 typedef struct
 {
     ULONG Offset        : 16;
@@ -306,7 +332,7 @@ struct _SOFT386_STATE
     SOFT386_BOP_PROC BopCallback;
     SOFT386_REG GeneralRegs[SOFT386_NUM_GEN_REGS];
     SOFT386_SEG_REG SegmentRegs[SOFT386_NUM_SEG_REGS];
-    SOFT386_REG InstPtr;
+    SOFT386_REG InstPtr, SavedInstPtr;
     SOFT386_FLAGS_REG Flags;
     SOFT386_TABLE_REG Gdtr, Idtr, Ldtr, Tss;
     ULONGLONG TimeStampCounter;
@@ -316,6 +342,7 @@ struct _SOFT386_STATE
     ULONG PrefixFlags;
     SOFT386_SEG_REGS SegmentOverride;
     BOOLEAN HardwareInt;
+    UCHAR PendingIntNum;
 };
 
 /* FUNCTIONS ******************************************************************/
@@ -356,6 +383,15 @@ VOID
 NTAPI
 Soft386SetStack(PSOFT386_STATE State, USHORT Segment, ULONG Offset);
 
+VOID
+NTAPI
+Soft386SetSegment
+(
+    PSOFT386_STATE State,
+    SOFT386_SEG_REGS Segment,
+    USHORT Selector
+);
+
 #endif // _SOFT386_H_
 
 /* EOF */