Look MA, All The Neat Things I Could Do, if Only I Were a VxD! 1 EDOS, a DOS extender for Windows Enhanced Mode EDOS is a powerful device driver program that extends the DOS environment to make DOS, Windows aware whenever DOS is being run from inside Windows. It's primary features include new command line commands and the ability to disable DOS commands. New commands provide technical information about the state of the DOS box and the state of Windows. Also, the ability to change PIF settings originally changeable only with the PIF editor. Other features include a hot key for exiting from a DOS Box, ability to view the clipboard and an alarm that returns you to the DOS Box where the alarm was originally created. Commands to start and stop high resolution timers for performance timing are also included. EDOS is a VxD, a special class of Windows Device Driver. VxD's form the very foundation of Windows Enhanced Mode. The core VxD code resides in the WIN386.EXE file. This file consists of many smaller pieces of code copied together to form an integrated set of VxDs(the default system in 386 mode). Each VxD component can be replaced in it's entirety, or one internal function at a time. This replaceability and substitutability provides tremendous flexibility. Windows standard/286 mode is not built this way and lacks the flexibility, inherent therein. 286 mode is difficult to modify, add to or replace. As a consequence, it is likely to receive little future development work, inside or outside Microsoft. EDOS uses so-called "undocumented DOS" function calls, hooking of protected mode/real mode interrupt vectors and service functions provided by other VxDs. EDOS employs VxD services for managing memory, scheduling, individual device and system control, keyboard, calling DOS & BIOS services, timing, initialization information and message displaying. In short, at least one or more functions from every major group of VxD support routines. A VxD runs at ring 0, the most privileged mode of the microprocessor. Because of this EDOS has access to the most basic parts of the Windows core. In tandem with a Windows Dynamic Link Library, a VxD like EDOS can be built to do almost anything, although at the present time no custom DLL is provided with EDOS. Even though the present version 2.00a is reasonably impressive, it is very crude compared to what could be done with more time and effort. VxD's offer great opportunities to enhance and extend Windows and it's components. 2 Features EDOS features are provided by 5 groups of commands. Control, Performance Timing, Information, Scheduling, Miscellaneous. Control Performance Timing Information Scheduling Misc. ALT-F4 BOXTIME STATUS/EDOS PRIB ALARM BOXSWITCH SYSTIME EMS PRIF XMS BACKGROUND PIF EXCLUSIVE MEM SLICE VER CLIPBOARD 3 Overview of Feature Groups EDOS functions & commands can be combined in a multitude of ways to enhance the way in which you use a DOS session in Windows. Several features are built in and simply make life easier. The ALF-F4 exit feature is one of these. Once you become accustomed to it, you'll never want to be without it. The other most noticeable feature is the pif file name and edos version number displayed at DOS session start-up. This combined with the ability to define a batch file to be run at every DOS session start-up means that you have almost unlimited flexibility to customise DOS sessions in general and any session specifically. The DOSSTART.BAT file executed at DOS session start-up is located by Windows starting with the current directory. If not found, then in the WINDIR directory, if not there then the PATH. If not - 2 - found by any of these routes then a "Bad command" message will be generated. Because of this step by step search method, you may have numerous DOSSTART batch files. The first one found is the one executed. By proper organization, you can cause the intended batch file to be found, using the "properties/working directory" option on the system menu button. Once you have the intended batch file executing with an ICON, you can customize to your hearts content. Any regular DOS command may be executed, as well as all EDOS commands. With all this power at your disposal, you may never find all the ways to combine these commands. A few suggestions. If you use a "CLS" first, the screen will be cleared to a prompt. You can then issue whatever commands you want to create the entry screen of your choice. By "TYPE" ing a file to the screen, that says "Windows DOS Session", you will have a highly visible indicator that Windows is running. In short, you can execute any internal or external command or program that you want. Outside of setting up the screen, the most likely thing you will want to do is add memory or change the scheduling system. Since you can set the scheduling options from a batch file it is no longer necessary to have a multitude of PIF files for every situation. The two control commands in EDOS are essentially hot key functions. ALT-F4 pushes "exit" + enter into the keyboard buffer which causes DOS to exit back to Windows. BOXSWITCH controls the ability to switch out of a DOS Box and back into Windows. The two performance timers The information services are the most detailed and complex of EDOS's functionality. - 3 - 4 EDOS code consists of 4 major components. Initialization: EDOS device initialization, hooking vectors and services, installing hot keys. Processing hooked interrupts, service calls and hot keys. Parsing and analyzing command lines. Servicing a supported command. A discussion of each of the 4 code sections(above), emphasizing the GENERAL principles involved ie. hooking service calls. Ability to CONTROL Windows, Ala the ALARM command. 5 Using EDOS A beginners perspective A programmers testing tool 6 Weaknesses and limitations Bugs in Windows. Bugs in DOS. Limitations of Windows and DOS. Copyright 1991, Michael P. Maurice 503-694-5267 CIS 71171,47 - 4 - Contents 1 EDOS, a DOS extender for Windows Enhanced Mode . . . . . . . . . . . . . . . . . . . . . 1 2 Features . . . . . . . . . . . . . . . . . . . 2 3 Overview of Feature Groups . . . . . . . . . . 2 4 EDOS code consists of 4 major components. . . . 4 5 Using EDOS . . . . . . . . . . . . . . . . . . 4 6 Weaknesses and limitations . . . . . . . . . . 4 i