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.
This commit is contained in:
parent
47402bab91
commit
10f1d28ac1
@ -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();
|
||||
}
|
||||
|
@ -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.
|
||||
.\"
|
||||
|
@ -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));
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user