Print Clean Clean

ANSI.SYS Shortcuts

 


This article is intended to speed up and generally improve your DOS environment. There is a file which ships with MS-DOS 6.22 and the Win95 DOS7 Command prompt called ANSI.SYS.

This little file can be loaded 'high' in your CONFIG.SYS file. It takes up very little of your precious conventional memory and opens up new worlds of potential for the command prompt. In your AUTOEXEC.BAT file, you can initialize the way ANSI.SYS defines the actions for your F1-F12 function keys at the command prompt. To do this, add this little section to autoexec.bat at the end which modifies the DOS prompt.

You will notice standard (but long) DOS commands in quotes in the above example; these are the functions the buttons will perform. The numbers, for example 62 or 134, refer to the keyboard codes of the function buttons.

The other commands refer to common practices such as quitting the current subdirectory and jumping straight to the root directory. Another useful command is to list only subdirectories.

By altering only the command-strings in the above example you can automate almost any procedure in DOS/Command. For example, the above block is actually NOT what I use in my autoexec.bat file; I launch another batch-file to load the above as 'STANDARD DOS SESSION', and preset the rest of the keys to load my favorite software.

For instance, if I exit Windows 95 and go to DOS to play Duke Nukem 3D (yes I know I can do it in Windows), all I need to do is to press F11, and the computer sets up Smartdrive and my soundcard, fails to load the DOS mouse-driver, and loads Duke Nukem with my favorite level preset.

Note that this won't work on your system unless you have batch files of those names. Basically the above strings load little batch-files I have in my c:\windows directory; 'DUKE', for example, is the one I mentioned above to set up Duke Nukem to auto-load on pressing F11 from entering DOS. 'INIT' is the F12 key setup for a standard DOS session with all the useful little add-ons.

Notice also that every ANSI setup ends with the line prompt $p$g. This is to return the command prompt to its usual form. Note also the '13p' part of the commands - this is the ENTER key, and if you leave it out, the command-string will still be entered - you'll just have to hit return as well.

Try the first example block in your autoexec.bat file, and see the advantage of being able to bring up only executable files, wide listings of names only, and all the rest, all at the touch of a button. Then set it up as a separate file for the standard session option at startup and 'install' your favorite games and DOS programs as function buttons. It makes MS-DOS work so much faster and easier.