diff --git a/kernel/dsk.c b/kernel/dsk.c index 654f8b9..70c4a8f 100644 --- a/kernel/dsk.c +++ b/kernel/dsk.c @@ -392,7 +392,7 @@ STATIC WORD getbpb(ddt * pddt) { /* copy default bpb to be sure that there is no bogus data */ memcpy(pbpbarray, &pddt->ddt_defbpb, sizeof(bpb)); - return S_DONE; + return 0; } pddt->ddt_descflags &= ~DF_NOACCESS; /* set drive to accessible */ diff --git a/kernel/inthndlr.c b/kernel/inthndlr.c index 5003512..089cbbc 100644 --- a/kernel/inthndlr.c +++ b/kernel/inthndlr.c @@ -1820,7 +1820,9 @@ VOID ASMCFUNC int2526_handler(WORD mode, struct int25regs FAR * r) else mode = DSKREADINT25; - drv = r->ax; + drv = r->ax & 0x7f; /* according to RBIL, some programs may try with */ + /* high bit of AL set, so mask it together with AH */ + /* otherwise we might access a non-existing unit */ if (drv >= lastdrive) {