1
0
Fork 0

Correct an oversight in I/O exceptions. Fixes bug #460.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4023
This commit is contained in:
ripsaw8080 2017-06-15 16:04:44 +00:00
parent 085c7a2f18
commit df0fa99d88

View file

@ -404,6 +404,7 @@ Bitu IO_ReadB(Bitu port) {
entry->eip=reg_eip;
CPU_Push16(SegValue(cs));
CPU_Push16(reg_ip);
Bit8u old_al = reg_al;
Bit16u old_dx = reg_dx;
reg_dx = port;
RealPt icb = CALLBACK_RealPointer(call_priv_io);
@ -415,6 +416,7 @@ Bitu IO_ReadB(Bitu port) {
iof_queue.used--;
retval = reg_al;
reg_al = old_al;
reg_dx = old_dx;
memcpy(&lflags,&old_lflags,sizeof(LazyFlags));
cpudecoder=old_cpudecoder;
@ -441,6 +443,7 @@ Bitu IO_ReadW(Bitu port) {
entry->eip=reg_eip;
CPU_Push16(SegValue(cs));
CPU_Push16(reg_ip);
Bit16u old_ax = reg_ax;
Bit16u old_dx = reg_dx;
reg_dx = port;
RealPt icb = CALLBACK_RealPointer(call_priv_io);
@ -452,6 +455,7 @@ Bitu IO_ReadW(Bitu port) {
iof_queue.used--;
retval = reg_ax;
reg_ax = old_ax;
reg_dx = old_dx;
memcpy(&lflags,&old_lflags,sizeof(LazyFlags));
cpudecoder=old_cpudecoder;
@ -477,6 +481,7 @@ Bitu IO_ReadD(Bitu port) {
entry->eip=reg_eip;
CPU_Push16(SegValue(cs));
CPU_Push16(reg_ip);
Bit32u old_eax = reg_eax;
Bit16u old_dx = reg_dx;
reg_dx = port;
RealPt icb = CALLBACK_RealPointer(call_priv_io);
@ -488,6 +493,7 @@ Bitu IO_ReadD(Bitu port) {
iof_queue.used--;
retval = reg_eax;
reg_eax = old_eax;
reg_dx = old_dx;
memcpy(&lflags,&old_lflags,sizeof(LazyFlags));
cpudecoder=old_cpudecoder;