@@ -235,7 +235,7 @@ static inline void exprintb(unsigned char val,char *bf,unsigned int pos)
235235 while (v ) { * p -- = ehextab [v & 15 ]; v >>=4 ; }
236236}
237237
238- char * e_print_regs (void )
238+ char * e_print_regs (unsigned int Interp_LONG_CS )
239239{
240240 static char buf [sizeof (eregbuf ) + 300 ];
241241 char * p = buf ;
@@ -261,7 +261,7 @@ char *e_print_regs(void)
261261 exprintl (TheCPU .eip ,buf ,(ERB_L4 + ERB_LEFTM )+ 39 );
262262 {
263263 int i ;
264- dosaddr_t csp = LONG_CS + TheCPU .eip ;
264+ dosaddr_t csp = Interp_LONG_CS + TheCPU .eip ;
265265 dosaddr_t st = LONG_SS + TheCPU .esp ;
266266 if (csp < 0xa0000 - 256 || dpmi_is_valid_range (csp , 256 )) {
267267 unsigned char * op = EMU_BASE32 (csp );
@@ -548,11 +548,10 @@ static void Reg2Cpu(struct vm86_struct *info)
548548
549549 /* FPU state is loaded later on demand for JIT, not used for simulator */
550550 TheCPU .fpstate = & vm86_fpu_state ;
551- LONG_CS = _LONG_CS ;
552551 if (debug_level ('e' )> 1 ) {
553552 if (debug_level ('e' )== 9 ) e_printf ("Reg2Cpu< vm86=%08x dpm=%08x emu=%08x\n%s\n" ,
554553 regs -> eflags ,get_FLAGS (TheCPU .eflags ),TheCPU .eflags ,
555- e_print_regs ());
554+ e_print_regs (LONG_CS ));
556555 else e_printf ("Reg2Cpu< vm86=%08x dpm=%08x emu=%08x\n" ,
557556 regs -> eflags ,get_FLAGS (TheCPU .eflags ),TheCPU .eflags );
558557 }
@@ -725,10 +724,9 @@ static void Scp2CpuD(cpuctx_t *scp)
725724 e_printf ("Scp2CpuD%s: CS:IP=%08x:%08x\n%s\n" ,
726725 (TheCPU .err ? " ERR" :"" ),
727726 LONG_CS , _eip ,
728- e_print_regs ());
727+ e_print_regs (LONG_CS ));
729728 }
730729 TheCPU .mode = mode ;
731- LONG_CS = _LONG_CS ;
732730}
733731
734732
@@ -1131,7 +1129,7 @@ static int e_dpmi_tail(cpuctx_t *scp)
11311129 /* 0 if ok, else exception code+1 or negative if dosemu err */
11321130 if (xval < 0 ) {
11331131 error ("DPM86: error %d\n" , - xval );
1134- error ("@\n%s" ,e_print_regs ());
1132+ error ("@\n%s" ,e_print_regs (LONG_CS ));
11351133 leavedos_main (0 );
11361134 return -1 ;
11371135 }
0 commit comments