diff --git a/docs/history.txt b/docs/history.txt index bc3619a..1012007 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -12,6 +12,8 @@ * allow creating, renaming and deleting volume labels using FCBs * fix renaming with wildcards using FCBs * some dosfns.c and fcbfns.c clean-ups + * booting from hard disk now always sets the default drive to C:, + not D: if booting from the second physical hard disk, etc (bug #1062). 2002 Feb 9 - Build 2026 -------- Bart Oldeman (bart@dosemu.org) + Changes Tom diff --git a/kernel/kernel.asm b/kernel/kernel.asm index 02969eb..19a87c4 100644 --- a/kernel/kernel.asm +++ b/kernel/kernel.asm @@ -174,7 +174,7 @@ cont: ; inititalize api stacks for high water tests inc bl jns floppy - add bl,3-1-128 + mov bl,3 ; set to C: if hard disk floppy: mov byte [_BootDrive],bl ; tell where we came from ;!! int 11h diff --git a/kernel/main.c b/kernel/main.c index bdf0f95..671fcb1 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -151,26 +151,21 @@ VOID ASMCFUNC FreeDOSmain(void) */ if (fmemcmp(MK_FP(0x50,0xe0+2),"CONFIG",6) == 0) /* UPX */ - { - fmemcpy(&InitKernelConfig, MK_FP(0x50,0xe0+2), sizeof(InitKernelConfig)); + { + fmemcpy(&InitKernelConfig, MK_FP(0x50,0xe0+2), sizeof(InitKernelConfig)); - BootDrive = *(BYTE FAR *)MK_FP(0x50,0xe0); - - BootDrive ++; + BootDrive = *(BYTE FAR *)MK_FP(0x50,0xe0) + 1; if ((unsigned)BootDrive >= 0x80) - BootDrive += 3-1-128; + BootDrive = 3; /* C: */ - - *(DWORD FAR *)MK_FP(0x50,0xe0+2) = 0; - - } + *(DWORD FAR *)MK_FP(0x50,0xe0+2) = 0; + } else - { - - fmemcpy(&InitKernelConfig, &LowKernelConfig, sizeof(InitKernelConfig)); - } - + { + fmemcpy(&InitKernelConfig, &LowKernelConfig, sizeof(InitKernelConfig)); + } + setvec(0, int0_handler); /* zero divide */ setvec(1, empty_handler); /* single step */ setvec(3, empty_handler); /* debug breakpoint */