From d9959431481bd83c0076e7272a38efcebf2ef306 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 27 Mar 2003 19:46:05 +0000 Subject: [PATCH] changed int 25 and int 26 to act like real int 25. Hopefully not all is broken Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@803 --- src/dos/dos.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/dos/dos.cpp b/src/dos/dos.cpp index 710a7f92..c08ae71f 100644 --- a/src/dos/dos.cpp +++ b/src/dos/dos.cpp @@ -28,6 +28,7 @@ #include "regs.h" #include "dos_inc.h" #include "setup.h" +#include "cpu.h" DOS_Block dos; DOS_InfoBlock dos_infoblock; @@ -861,11 +862,12 @@ static Bitu DOS_27Handler(void) return CBRET_NONE; } static Bitu DOS_25Handler(void) { + flags.type=t_UNKNOWN; if(Drives[reg_al]==0){ reg_ax=0x8002; - CALLBACK_SCF(true); + flags.cf=true; }else{ - CALLBACK_SCF(false); + flags.cf=false; reg_ax=0; if((reg_cx != 1) ||(reg_dx != 1)) LOG(LOG_DOSMISC,"int 25 called but not as diskdetection"); @@ -874,11 +876,13 @@ static Bitu DOS_25Handler(void) { } static Bitu DOS_26Handler(void) { LOG(LOG_DOSMISC,"int 26 called: hope for the best!"); + flags.type=t_UNKNOWN; if(Drives[reg_al]==0){ + reg_ax=0x8002; - CALLBACK_SCF(true); + flags.cf=true; }else{ - CALLBACK_SCF(false); + flags.cf=false; reg_ax=0; } return CBRET_NONE; @@ -912,7 +916,7 @@ void DOS_Init(Section* sec) { RealSetVec(0x25,CALLBACK_RealPointer(call_25)); call_26=CALLBACK_Allocate(); - CALLBACK_Setup(call_26,DOS_21Handler,CB_RETF); + CALLBACK_Setup(call_26,DOS_26Handler,CB_RETF); RealSetVec(0x26,CALLBACK_RealPointer(call_26)); call_27=CALLBACK_Allocate();