summaryrefslogtreecommitdiffstats
path: root/usr.bin/doscmd
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1998-07-16 23:54:26 +0000
committerimp <imp@FreeBSD.org>1998-07-16 23:54:26 +0000
commit7cdd4f6b5dc78573065f0f7c4ef83436453511bd (patch)
tree7b3b12c5e5d81bcfd15dda089823aaa6edb3e217 /usr.bin/doscmd
parenta0f37891cd74449b686d773a4d5e85fe6410587a (diff)
downloadFreeBSD-src-7cdd4f6b5dc78573065f0f7c4ef83436453511bd.zip
FreeBSD-src-7cdd4f6b5dc78573065f0f7c4ef83436453511bd.tar.gz
o remove -f from doscmd man page, as it is not implemented.
o Remove init printf o Don't set optind from return value for do_args. getopt has already done this. o Bump EMS memory from 1M to 10M (this really should be a command line option). o Open /dev/null when requested to open emmxxxx0 to allow many programs checking to see if EMS is installed to find it. o Route int67 to ems_entry to allow EMS to be used when DOS is emulated as well as when DOS is booted. This may obviate the need for the driver doing anything at all in a really booted situation and won't hurt that case. I can now run the DOS program I'm interested in running with enough EMS memory that its "advanced" functions are enabled and working.
Diffstat (limited to 'usr.bin/doscmd')
-rw-r--r--usr.bin/doscmd/dos.c22
-rw-r--r--usr.bin/doscmd/doscmd.18
-rw-r--r--usr.bin/doscmd/doscmd.c5
-rw-r--r--usr.bin/doscmd/ems.h4
4 files changed, 25 insertions, 14 deletions
diff --git a/usr.bin/doscmd/dos.c b/usr.bin/doscmd/dos.c
index 7d79c2f..aada188 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.2 1998/07/01 19:56:13 imp Exp $
+ * $Id: dos.c,v 1.3 1998/07/02 05:12:52 imp Exp $
*/
#include "doscmd.h"
@@ -277,6 +277,14 @@ translate_filename(u_char *dname, u_char *uname, int *drivep)
return (0);
}
+ /* XXX KLUDGE for EMS support w/o booting DOS */
+ /* Really need a better way to handle devices */
+ if (!strcasecmp(dname, "emmxxxx0")) {
+ *drivep = -1;
+ strcpy(uname, "/dev/null");
+ return (0);
+ }
+
error = dos_makepath(dname, newpath);
if (error)
return (error);
@@ -2466,6 +2474,12 @@ int21(regcontext_t *REGS)
return;
}
+static void
+int67(regcontext_t *REGS)
+{
+ ems_entry(REGS);
+}
+
static u_char upcase_trampoline[] = {
0xf4, /* HLT */
0xcb, /* RETF */
@@ -2493,6 +2507,10 @@ dos_init(void)
ivec[0x29] = vec;
register_callback(vec, int29, "int 29");
+ vec = insert_softint_trampoline();
+ ivec[0x67] = vec;
+ register_callback(vec, int67, "int 67 (EMS)");
+
vec = insert_null_trampoline();
ivec[0x28] = vec; /* dos idle */
ivec[0x2b] = vec; /* reserved */
@@ -2505,4 +2523,6 @@ dos_init(void)
/* build fastlookup index into the monster table of interrupts */
intfunc_init(int21_table, int21_fastlookup);
+
+ ems_init();
}
diff --git a/usr.bin/doscmd/doscmd.1 b/usr.bin/doscmd/doscmd.1
index 6a3dafc..83f09f3 100644
--- a/usr.bin/doscmd/doscmd.1
+++ b/usr.bin/doscmd/doscmd.1
@@ -137,14 +137,6 @@ Enable debugging of the exec routines.
.\"
.\"
.\"
-.It Fl f
-Use
-.Xr fork 2
-for spawned processes rather than running them in the
-current memory space.
-.\"
-.\"
-.\"
.It Fl H
Enable tracing of half implemented calls.
.\"
diff --git a/usr.bin/doscmd/doscmd.c b/usr.bin/doscmd/doscmd.c
index 7082dd2..c83903c 100644
--- a/usr.bin/doscmd/doscmd.c
+++ b/usr.bin/doscmd/doscmd.c
@@ -29,7 +29,7 @@
*
* BSDI doscmd.c,v 2.3 1996/04/08 19:32:30 bostic Exp
*
- * $Id: doscmd.c,v 1.5 1998/07/01 19:56:14 imp Exp $
+ * $Id: doscmd.c,v 1.6 1998/07/02 05:23:54 imp Exp $
*/
#include <sys/types.h>
@@ -129,7 +129,7 @@ main(int argc, char **argv)
debug_set(0); /* debug any D_TRAPS without intnum */
/* perform option argument processing */
- optind = do_args(argc, argv);
+ do_args(argc, argv);
argc -= optind;
argv += optind;
@@ -270,7 +270,6 @@ main(int argc, char **argv)
vm86.sub_op = VM86_INIT;
vm86.sub_args = (char *)&kargs;
i = sysarch(I386_VM86, &vm86);
- printf("Init: %d\n", i);
sigreturn(&sc);
debug(D_ALWAYS,"sigreturn failed : %s\n", strerror(errno));
diff --git a/usr.bin/doscmd/ems.h b/usr.bin/doscmd/ems.h
index 866a551..990866c 100644
--- a/usr.bin/doscmd/ems.h
+++ b/usr.bin/doscmd/ems.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id$
+ * $Id: ems.h,v 1.1 1997/09/30 22:03:45 jlemon Exp $
*/
#ifndef EMS_H
@@ -36,7 +36,7 @@
/* Global definitions, some of them will be configurable in the future */
#define EMS_NUM_HANDLES 256 /* Includes OS handle 0 */
-#define EMS_MAXSIZE 1024 /* In kbytes */
+#define EMS_MAXSIZE 10240 /* In kbytes */
#define EMS_MAX_PHYS 4 /* Frame is 64kB */
#define EMS_FRAME_ADDR 0xe0000
#define EMS_VERSION 0x40 /* Version 4.0 */
OpenPOWER on IntegriCloud