diff options
Diffstat (limited to 'memdisk/setup.c')
| -rw-r--r-- | memdisk/setup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c index b611bbca..829893a7 100644 --- a/memdisk/setup.c +++ b/memdisk/setup.c @@ -776,7 +776,7 @@ void setup(syscall_t cs_syscall, void *cs_bounce) regs.eax.b[1] = 0x08; regs.edx.b[0] = geometry->driveno & 0x80; syscall(0x13, ®s, ®s); - + if ( regs.eflags.l & 1 ) { printf("INT 13 08: Failure, assuming this is the only drive\n"); pptr->drivecnt = 0; @@ -785,19 +785,19 @@ void setup(syscall_t cs_syscall, void *cs_bounce) regs.edx.b[0], regs.es, regs.edi.w[0]); pptr->drivecnt = regs.edx.b[0]; } - + /* Compare what INT 13h returned with the appropriate equipment byte */ if ( geometry->driveno & 0x80 ) { bios_drives = rdz_8(BIOS_HD_COUNT); } else { uint8_t equip = rdz_8(BIOS_EQUIP); - + if (equip & 1) bios_drives = (equip >> 6)+1; else bios_drives = 0; } - + if (pptr->drivecnt > bios_drives) { printf("BIOS equipment byte says count = %d, go with that\n", bios_drives); |
