From c2b1f89fa2e6804bd7f16e608f5245f9a55a8431 Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Sun, 27 Oct 2002 10:48:47 +0000 Subject: [PATCH] int 8 is now saving ds,dx,ax before calling int 1c Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@452 --- src/ints/bios.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index 64c80207..a3c5db35 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -104,9 +104,19 @@ static Bitu INT8_Handler(void) { /* decrease floppy motor timer */ Bit8u val = mem_readb(BIOS_DISK_MOTOR_TIMEOUT); if (val>0) mem_writeb(BIOS_DISK_MOTOR_TIMEOUT,val-1); - + /* and running drive */ + mem_writeb(BIOS_DRIVE_RUNNING,mem_readb(BIOS_DRIVE_RUNNING) & 0xF0); + // Save ds,dx,ax + Bit16u oldds = SegValue(ds); + Bit16u olddx = reg_dx; + Bit16u oldax = reg_ax; + // run int 1c CALLBACK_RunRealInt(0x1c); IO_Write(0x20,0x20); + // restore old values + SegSet16(ds,oldds); + reg_dx = olddx; + reg_ax = oldax; return CBRET_NONE; };