diff options
author | imp <imp@FreeBSD.org> | 1998-07-17 00:18:52 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1998-07-17 00:18:52 +0000 |
commit | 98b8e2a5eabba620e57948c1d548d390b20f42a9 (patch) | |
tree | 76bf33e42a240382122f08ce4133c15c2c5c6a5f /usr.bin/doscmd | |
parent | 7cdd4f6b5dc78573065f0f7c4ef83436453511bd (diff) | |
download | FreeBSD-src-98b8e2a5eabba620e57948c1d548d390b20f42a9.zip FreeBSD-src-98b8e2a5eabba620e57948c1d548d390b20f42a9.tar.gz |
o for unknown int21 functions, set the CY bit to indicate failure
o When reporting a int21 function we don't know about yet, report
AH as the major and AL as the minor, as opposed to reporting AL
as the major.
o Add support for 21:44:7: ioctl check output status. We
optimistically say that output is always ready.
o Add half support for 21:23: get file size. We always now return
failure. This function isn't supported, according to the interrupt
list, by the DOS box in windows, so I don't feel too bad.
Diffstat (limited to 'usr.bin/doscmd')
-rw-r--r-- | usr.bin/doscmd/dos.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/usr.bin/doscmd/dos.c b/usr.bin/doscmd/dos.c index aada188..b813304 100644 --- a/usr.bin/doscmd/dos.c +++ b/usr.bin/doscmd/dos.c @@ -31,7 +31,7 @@ * * BSDI int21.c,v 2.2 1996/04/08 19:32:51 bostic Exp * - * $Id: dos.c,v 1.3 1998/07/02 05:12:52 imp Exp $ + * $Id: dos.c,v 1.4 1998/07/16 23:54:23 imp Exp $ */ #include "doscmd.h" @@ -708,6 +708,21 @@ int21_1a(regcontext_t *REGS) } /* +** 21:23 +** +** Get file size for fcb +** DS:DX -> unopened FCB, no wildcards. +** pcb random record field filled in with number of records, rounded up. +*/ +static int +int21_23(regcontext_t *REGS) +{ + debug(D_HALF, "Returning failure from get file size for fcb 21:23\n"); + R_AL = 0xff; + return(0); +} + +/* ** 21:25 ** ** set interrupt vector @@ -1475,6 +1490,19 @@ int21_44_1(regcontext_t *REGS) } /* +** 21:44:7 +** +** Get output status +*/ +static int +int21_44_7(regcontext_t *REGS) +{ + /* XXX Should really check to see if BX is open or not */ + R_AX = 0xFF; + return(0); +} + +/* ** 21:44:8 ** ** test for removable block device @@ -2276,6 +2304,7 @@ static struct intfunc_table int21_table [] = { { 0x1b, IFT_NOSUBFUNC, int21_free, "get allocation for default drive"}, { 0x1c, IFT_NOSUBFUNC, int21_free, "get allocation for specific drive"}, { 0x1f, IFT_NOSUBFUNC, int21_NOFUNC, "get DPB for current drive"}, + { 0x23, IFT_NOSUBFUNC, int21_23, "Get file size (old)"}, { 0x25, IFT_NOSUBFUNC, int21_25, "set interrupt vector"}, { 0x26, IFT_NOSUBFUNC, int21_26, "create new PSP"}, { 0x2a, IFT_NOSUBFUNC, int21_2a, "get date"}, @@ -2308,6 +2337,7 @@ static struct intfunc_table int21_table [] = { { 0x43, IFT_NOSUBFUNC, int21_43, "get/set file attributes"}, { 0x44, 0x00, int21_44_0, "ioctl(get)"}, { 0x44, 0x01, int21_44_1, "ioctl(set)"}, + { 0x44, 0x07, int21_44_7, "ioctl(Check output status)"}, { 0x44, 0x08, int21_44_8, "ioctl(test removable)"}, { 0x44, 0x09, int21_44_9, "ioctl(test remote)"}, { 0x45, IFT_NOSUBFUNC, int21_45, "dup"}, @@ -2449,7 +2479,9 @@ int21(regcontext_t *REGS) index = intfunc_find(int21_table, int21_fastlookup, R_AH, R_AL); if (index == -1) { /* no matching functions */ - unknown_int2(0x21, R_AL, REGS); + unknown_int3(0x21, R_AH, R_AL, REGS); + R_FLAGS |= PSL_C; /* Flag an error */ + R_AX = 0xff; return; } |