From: Eduardo C. <cas...@mo...> - 2005-12-09 15:35:48
|
Hello All, This patch adds support for int 2F122B (Internal IOCTL) and int 2F122D (Internal Get Extended Error) to kernel. Those are necessary for the upcoming new version of NLSFUNC to work with DISPLAY 1.0. Regards, Eduardo. diff -uNrp /home/eduardo/fdos/kernel/cvs/unstable/kernel/kernel/inthndlr.c kernel/kernel/inthndlr.c --- /home/eduardo/fdos/kernel/cvs/unstable/kernel/kernel/inthndlr.c 2005-12-08 13:51:26.000000000 +0100 +++ kernel/kernel/inthndlr.c 2005-12-08 14:12:50.340721000 +0100 @@ -2233,12 +2233,40 @@ VOID ASMCFUNC int2F_12_handler(struct in r.FLAGS &= ~FLG_CARRY; break; + case 0x2b: /* Device I/O Control */ + if (r.BP < 0x4400 || r.BP > 0x44ff) + goto error_invalid; + { + lregs lr; + lr.AX = r.BP; + lr.BX = r.BX; + lr.CX = r.CX; + lr.DX = r.DX; + lr.DI = r.DI; + lr.SI = r.SI; + lr.DS = r.DS; + rc = DosDevIOctl(&lr); /* can set critical error code! */ + } + + if (rc < SUCCESS) + { + r.AX = -rc; + if (rc != DE_DEVICE && rc != DE_ACCESS) + CritErrCode = r.AX; + goto error_carry; + } + break; + case 0x2c: /* added by James Tabor For Zip Drives Return Null Device Pointer */ /* by UDOS+RBIL: get header of SECOND device driver in device chain, omitting the NUL device TE */ r.BX = FP_SEG(nul_dev.dh_next); r.AX = FP_OFF(nul_dev.dh_next); + break; + + case 0x2d: /* Get Extended Error Code */ + r.AX = CritErrCode; /* fall through only to re-use break */ case 0x2e: /* GET or SET error table addresse - ignored called by MS debug with DS != DOSDS, printf @@ -2285,6 +2313,7 @@ error_exit: r.AX = -rc; if (CritErrCode == SUCCESS) CritErrCode = r.AX; /* Maybe set */ +error_carry: r.FLAGS |= FLG_CARRY; } |