- the int13_harddisk() function modifies the high word of EAX in EDD read/write

functions, but it shouldn't, so it must be saved on stack
This commit is contained in:
Volker Ruppert 2006-12-30 17:13:44 +00:00
parent edc6a6cf4d
commit 0837438f7f
3 changed files with 11 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: rombios.c,v 1.175 2006-11-04 18:06:36 vruppert Exp $
// $Id: rombios.c,v 1.176 2006-12-30 17:13:17 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -929,7 +929,7 @@ Bit16u cdrom_boot();
#endif // BX_ELTORITO_BOOT
static char bios_cvs_version_string[] = "$Revision: 1.175 $ $Date: 2006-11-04 18:06:36 $";
static char bios_cvs_version_string[] = "$Revision: 1.176 $ $Date: 2006-12-30 17:13:17 $";
#define BIOS_COPYRIGHT_STRING "(c) 2002 MandrakeSoft S.A. Written by Kevin Lawton & the Bochs team."
@ -4739,8 +4739,8 @@ BX_DEBUG_INT74("int74_function: make_farcall=1\n");
#if BX_USE_ATADRV
void
int13_harddisk(DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS)
Bit16u DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS;
int13_harddisk(EHAX, DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS)
Bit16u EHAX, DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS;
{
Bit32u lba;
Bit16u ebda_seg=read_word(0x0040,0x000E);
@ -5815,8 +5815,8 @@ ASM_END
}
void
int13_harddisk(DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS)
Bit16u DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS;
int13_harddisk(EHAX, DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS)
Bit16u EHAX, DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS;
{
Bit8u drive, num_sectors, sector, head, status, mod;
Bit8u drive_map;
@ -8077,7 +8077,12 @@ int13_notcdrom:
#endif
int13_disk:
;; int13_harddisk modifies high word of EAX
shr eax, #16
push ax
call _int13_harddisk
pop ax
shl eax, #16
int13_out:
pop ds