mirror of
https://github.com/FDOS/kernel.git
synced 2025-04-08 17:15:17 +02:00
add initial support for DRIVER.SYS
currently only skeleton logic and implementation of install check & get drive data table list [returns ddt* which allows mapping DOS drive # to BIOS drive # for drives handled by default DOS block driver]
This commit is contained in:
parent
8bdb2db5f6
commit
ed2fd81927
@ -1922,6 +1922,7 @@ extern intvec FAR ASM BIOSInt19;
|
||||
/* WARNING: modifications in `r' are used outside of int2F_12_handler()
|
||||
* On input r.AX==0x12xx, 0x4A01 or 0x4A02
|
||||
* also handle Windows' DOS notification hooks, r.AH==0x16 and r.AH==0x13
|
||||
* along with DRIVER.SYS/DRIVPARAM r.AH=0x08 calls
|
||||
*/
|
||||
VOID ASMCFUNC int2F_12_handler(struct int2f12regs FAR *pr)
|
||||
{
|
||||
@ -2203,6 +2204,30 @@ VOID ASMCFUNC int2F_12_handler(struct int2f12regs FAR *pr)
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
else if (r.AH == 0x08) /* DRIVER.SYS / DRIVPARAM */
|
||||
{
|
||||
switch (r.AL)
|
||||
{
|
||||
case 0x00: /* installation check */
|
||||
r.AL = 0xff; /* installed, 0=not installed */
|
||||
break;
|
||||
|
||||
case 0x01: /* add new block device */
|
||||
/* TODO, see push_ddt() */
|
||||
break;
|
||||
|
||||
case 0x02: /* execute device driver request */
|
||||
/* TODO */
|
||||
break;
|
||||
|
||||
case 0x03: /* get drive data table */
|
||||
r.DS = FP_SEG(&nul_dev);
|
||||
r.DI = FP_OFF(getddt(0));
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
/* else (r.AH == 0x12) */
|
||||
|
||||
switch (r.AL)
|
||||
|
@ -340,6 +340,9 @@ STATIC void init_kernel(void)
|
||||
LoL->lastdrive = 26;
|
||||
|
||||
/* init_device((struct dhdr FAR *)&blk_dev, NULL, 0, &ram_top); */
|
||||
/* WARNING: dsk_init() must be called prior to update_dcb() to ensure
|
||||
_Dyn (start of Dynamic memory block) is the start of drive data table (see getddt() in dsk.c)
|
||||
*/
|
||||
blk_dev.dh_name[0] = dsk_init();
|
||||
|
||||
PreConfig();
|
||||
|
Loading…
x
Reference in New Issue
Block a user