Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix disk_1301 handler.
regs->ah was getting clobbered in call to disk_ret().
  • Loading branch information
KevinOConnor committed Mar 23, 2008
1 parent dfa1650 commit fad2da8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/disk.c
Expand Up @@ -142,7 +142,8 @@ emu_access(struct bregs *regs, u8 device, u16 command)
, MAKE_32_PTR(segment, offset), before*512);
irq_disable();
if (status != 0) {
BX_INFO("int13_harddisk: function %02x, error %02x !\n",regs->ah,status);
BX_INFO("int13_harddisk: function %02x, error %02x !\n"
, regs->ah, status);
regs->al = 0;
disk_ret(regs, DISK_RET_EBADTRACK);
}
Expand Down Expand Up @@ -222,8 +223,10 @@ disk_1300(struct bregs *regs, u8 device)
static void
disk_1301(struct bregs *regs, u8 device)
{
regs->ah = GET_BDA(disk_last_status);
disk_ret(regs, DISK_RET_SUCCESS);
u8 v = GET_BDA(disk_last_status);
regs->ah = v;
set_cf(regs, v);
// XXX - clear disk_last_status?
}

// read disk sectors
Expand Down

0 comments on commit fad2da8

Please sign in to comment.