Updates for new Segment structure
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@890
This commit is contained in:
parent
24e82f2d33
commit
ddd427f40f
1 changed files with 10 additions and 6 deletions
|
@ -40,9 +40,13 @@ struct Segment {
|
|||
PhysPt phys; /* The phyiscal address start in emulated machine */
|
||||
};
|
||||
|
||||
|
||||
enum SegNames { es=0,cs,ss,ds,fs,gs};
|
||||
|
||||
struct Segments {
|
||||
Bitu val[8];
|
||||
PhysPt phys[8];
|
||||
};
|
||||
|
||||
union GenReg32 {
|
||||
Bit32u dword[1];
|
||||
Bit16u word[2];
|
||||
|
@ -69,7 +73,7 @@ struct CPU_Regs {
|
|||
GenReg32 regs[8],ip;
|
||||
};
|
||||
|
||||
extern Segment Segs[6];
|
||||
extern Segments Segs;
|
||||
extern Flag_Info flags;
|
||||
extern CPU_Regs cpu_regs;
|
||||
|
||||
|
@ -78,11 +82,11 @@ extern CPU_Regs cpu_regs;
|
|||
//#define SegValue(index) Segs[index].val
|
||||
|
||||
INLINE PhysPt SegPhys(SegNames index) {
|
||||
return Segs[index].phys;
|
||||
return Segs.phys[index];
|
||||
}
|
||||
|
||||
INLINE Bit16u SegValue(SegNames index) {
|
||||
return Segs[index].val;
|
||||
return Segs.val[index];
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,8 +96,8 @@ INLINE RealPt RealMakeSeg(SegNames index,Bit16u off) {
|
|||
|
||||
|
||||
INLINE void SegSet16(Bitu index,Bit16u val) {
|
||||
Segs[index].val=val;
|
||||
Segs[index].phys=val << 4;
|
||||
Segs.val[index]=val;
|
||||
Segs.phys[index]=val << 4;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue