Diff for /np2/i386c/ia32/ia32.c between versions 1.5 and 1.6

version 1.5, 2004/01/13 16:33:07 version 1.6, 2004/01/23 14:33:26
Line 144  change_pm(BOOL onoff) Line 144  change_pm(BOOL onoff)
   
         if (onoff) {          if (onoff) {
                 for (i = 0; i < CPU_SEGREG_NUM; i++) {                  for (i = 0; i < CPU_SEGREG_NUM; i++) {
                         CPU_STAT_SREG(i).valid = TRUE;                          CPU_STAT_SREG(i).valid = 1;
                         CPU_STAT_SREG(i).dpl = 0;                          CPU_STAT_SREG(i).dpl = 0;
                 }                  }
                 VERBOSE(("Entering to Protected-Mode..."));                  VERBOSE(("Entering to Protected-Mode..."));
         } else {          } else {
                 VERBOSE(("Leaveing from Protected-Mode..."));                  VERBOSE(("Leaveing from Protected-Mode..."));
         }          }
   
           CPU_INST_OP32 = CPU_INST_AS32 =
               CPU_STATSAVE.cpu_inst_default.op_32 = 
               CPU_STATSAVE.cpu_inst_default.as_32 = 0;
           CPU_STAT_SS32 = 0;
         CPU_STAT_CPL = 0;          CPU_STAT_CPL = 0;
         CPU_STAT_PM = onoff;          CPU_STAT_PM = onoff;
 }  }
Line 162  change_pg(BOOL onoff) Line 167  change_pg(BOOL onoff)
         if (onoff) {          if (onoff) {
                 VERBOSE(("Entering to Paging-Mode..."));                  VERBOSE(("Entering to Paging-Mode..."));
         } else {          } else {
                 VERBOSE(("Leaveing from Pagin-Mode..."));                  VERBOSE(("Leaveing from Paging-Mode..."));
         }          }
         CPU_STAT_PAGING = onoff;          CPU_STAT_PAGING = onoff;
 }  }
Line 170  change_pg(BOOL onoff) Line 175  change_pg(BOOL onoff)
 void FASTCALL  void FASTCALL
 change_vm(BOOL onoff)  change_vm(BOOL onoff)
 {  {
         descriptor_t sd;  
         int i;          int i;
   
           CPU_STAT_VM86 = onoff;
         if (onoff) {          if (onoff) {
                 for (i = 0; i < CPU_SEGREG_NUM; i++) {                  for (i = 0; i < CPU_SEGREG_NUM; i++) {
                         sd.u.seg.limit = 0xffff;                          CPU_SET_SEGREG(i, CPU_REGS_SREG(i));
                         CPU_SET_SEGDESC_DEFAULT(&sd, i, CPU_REGS_SREG(i));  
                         sd.dpl = 3;  
                         CPU_STAT_SREG(i) = sd;  
                 }                  }
                   CPU_INST_OP32 = CPU_INST_AS32 =
                       CPU_STATSAVE.cpu_inst_default.op_32 =
                       CPU_STATSAVE.cpu_inst_default.as_32 = 0;
                   CPU_STAT_SS32 = 0;
                   CPU_STAT_CPL = 3;
                 VERBOSE(("Entering to Virtual-8086-Mode..."));                  VERBOSE(("Entering to Virtual-8086-Mode..."));
         } else {          } else {
                 VERBOSE(("Leaveing from Virtual-8086-Mode..."));                  VERBOSE(("Leaveing from Virtual-8086-Mode..."));
         }          }
         CPU_STAT_VM86 = onoff;  
 }  }
   
 /*  /*

Removed from v.1.5  
changed lines
  Added in v.1.6


RetroPC.NET-CVS <cvs@retropc.net>