The command line interpreter conventions used by ASHC11, DHC11, BINCVT, GMCKS, and other Tech Edge commands are also described here.
You should then get a window that has "MS-DOS Prompt" in the title bar, and the
window will show text something like:
Microsoft(R) Windows 95
(C)Copyright Microsoft Corp 1981-1996.
The "D:\xxx>" is called the Dos Prompt, and you will often hear people
saying "at the Dos prompt, type ..". This means that you start up a Dos BOX, as
shown above, and then start typing whatever is requested. The Dos prompt shows
the current path name - D:\xxx in this case. The current path is
made up of the Drive letter, in this case D, and the current
directory name \xxx in this case. The colon (:) and the left triangle brackets
(>) are just separators between the drive letter, directory name, and the prompt (which
is the ">" symbol).
There is a third way to execute a Dos command without actually "going to Dos" (or starting a Dos box, as described above). This is done by:
D:\>dir Volume in drive D is D-SECOND Volume Serial Number is 0276-1809 Directory of D:\ INFO <DIR> 01-28-98 5:23p INFO DOCS <DIR> 01-28-98 5:22p DOCS X BIN 16,384 05-16-00 6:51a X.BIN UNTITLED TXT 1,430 05-29-98 4:46p untitled.txt . . . . . . . DEFAULT HTM 2,036 06-11-98 2:20p default.htm 17 file(s) 264,665 bytes 12 dir(s) 389,242,880 bytes free D:\>There are other Dos commands you should know, including CD to change directory, TYPE to show the contents of ASCII (ie. human readable) files, and many others. Depending on how your windows has been set up, you may be able to type HELP and get a display of all available DOS commands. If not, then you may need to copy some of the files from your Windows installation disk.
On-line information about DOS commands can be found at places like http://ajclark.eng.umd.edu/~nsw/ench250/dostutor.htm but try your favorite search engine.
C:\>dir /? Displays a list of files and subdirectories in a directory. DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]] [/O[[:]sortorder]] [/S] [/B] [/L] [/V] [drive:][path][filename] Specifies drive, directory, and/or files to list. (Could be enhanced file specification or multiple filespecs.) /P Pauses after each screenful of information. /W Uses wide list format. ... ... ... ...Our point is that most DOS commands come with built in switches that can often be discovered by typing the command and adding a /?. Unix commands often use a similar convention, but with a minus (-) symbol to delimit successive switches.
C:\BINS>BINCVT BINCVT - Hex to Binary V0.00A (c) Copyright 2000 Tech Edge Pty. Ltd. Usage: infile -[option[=parameter] ...] options: -Output= Name of binary file produced, defaulttaking each of these lines in turn:
.BIN. -OVerwrite Overwrite output file if it already exists. -Fill= Hex fill character for uninitialised data, default $00. -Startaddr= Start address for output data, default from hex input file. -Length= Length of output data, default from hex input file. -Convert= Conversion type (NO OPTIONS YET), default S19 -> BIN. ? Show this help page. C:\BINS>
BINCVT - Hex to Binary V0.00A (c) Copyright 2000 Tech Edge Pty. Ltd.This is the program's title line showing the program's name, the version and the copyright owner and date.
Usage: infile -[option[=parameter] ...]This is the syntax for using the program. It says you must supply something called an infile, and optionally, you supply option(s) with (or without) an optional parameter (separated with an equals symbol, but no spaces). This is a fairly standard way of representing a command's syntax. The [syntax within square brackets] is optional, so brackets within brackets are optional parts of options. The ellipse marks (...) indicates that the previous part can be repeated, allowing a selection of options.
The options (also called switches) that can be used are detailed in the last part of the
above message, reproduced below:
-Output= Name of binary file produced, default
Note that many options have defaults actions that occur, or parameters that
are used, when no switch is supplied.
Combining the above pieces of information, we arrive at some valid command lines:
D:\>BINCVT asbx.s19This will automatically take ASBX.S19 and convert it to the binary ASBX.BIN, with the start and end addresses being defined by the S19 file. If we want to change the name of the file produced, to say X.BIN then we can use the -Output option that takes the desired output name as the parameter referred to above:
D:\>BINCVT amxy.s19 -o=x.bin BINCVT - Hex to Binary V0.00 (c) Copyright 2000 Tech Edge Pty. Ltd. 513 lines read from amxy.s19, range from $C000 to $FFFF output file x.bin has 16384 bytes ($4000).Note that we only need to supply the O of output, and that we have not added any spaces between the O= and the file name X.BIN. Note also that we could have used lower case letters, or equally, we could have used upper case letters. In fact, all of the following command will have the same effect:
D:\>BINCVT amxy.s19 -Output=x.bin D:\>BINCVT amxy.s19 -Out=x.bin D:\>BINCVT AMXY.S19 -o=X.BINIf the output file (AMXY.BIN) already exists, then the program will produce an error message as follows:
Output file "x.bin" already exists (use -OV option).The OVerwrite switch tells the BINCVT command to overwrite the existing output file (we could also use a Dos command to delete or rename the existing file). Note that we must specify, as a minimum, the two characters OV, as just the O character means Output. The overwrite switch does not require any parameter. Here's the command and the output:
D:\>BINCVT amxy.s19 -o=x.bin ov BINCVT - Hex to Binary V0.00 (c) Copyright 2000 Tech Edge Pty. Ltd. 513 lines read from amxy.s19, range from $C000 to $FFFF output file x.bin has 16384 bytes ($4000).Note that we have not used a hyphen (-) in front of the ov switch. The syntax tells us that we only need to use the first hyphen, however it is quite acceptable to use a hyphen as a prefix for all switches - this can improve the readability of the command line.
D:\>doskey/? Edits command lines, recalls command lines, and creates macros DOSKEY [/switch ...] [macroname=[text]] /BUFSIZE:size Sets size of macro and command buffer (default:512 /ECHO:on|off Enables/disables echo of macro expansions (default:on) /FILE:file Specifies file containing a list of macros /HISTORY Displays all commands stored in memory /INSERT Inserts new characters into line when typing /KEYSIZE:size Sets size of keyboard type-ahead buffer (default:15) /LINE:size Sets maximum size of line edit buffer (default:128 /MACROS Displays all DOSKey macros /OVERSTRIKE Overwrites new characters onto line when typing (default) /REINSTALL Installs a new copy of DOSKey macroname Specifies a name for a macro you create text Specifies commands you want to assign to the macro UP,DOWN arrows recall commands Esc clears current command F7 displays command history Alt+F7 clears command history [chars]F8 searches for command beginning with [chars] F9 selects a command by number Alt+F10 clears macro definitions The following are special codes you can use in DOSKey macro definitions: $T Command separator: allows multiple commands in a macro $1-$9 Batch parameters: equivalent to %1-%9 in batch programs $* Symbol replaced by everything following macro name on the command lineSo, if we have doskey running we can simply hit the UP arrow key to recall the last entered command. In the case of running BINCVT, say we get a message as follows:
D:\>BINCVT amxy.S19VT -o=x.bin BINCVT - Hex to Binary V0.00 (c) Copyright 2000 Tech Edge Pty. Ltd. 513 lines read from amxy.s19, range from $C000 to $FFFF Output file "x.bin" already exists (use -OV option).Rather than retype the whole command, you only need to press UP arrow and type in (space) -ov. This is shown below:
D:\>BINCVT amxy.s19 -o=x.bin BINCVT - Hex to Binary V0.00 (c) Copyright 2000 Tech Edge Pty. Ltd. 513 lines read from amxy.s19, range from $C000 to $FFFF Output file "x.bin" already exists (use -OV option). --press UP arrow here-- D:\>BINCVT amxy.s19 -o=x.bin ov BINCVT - Hex to Binary V0.00 (c) Copyright 2000 Tech Edge Pty. Ltd. 513 lines read from amxy.s19, range from $C000 to $FFFF output file x.bin has 16384 bytes ($4000).
By default, the Dos Box will display 25 lines of text. If you click on the MOS-DOS icon in the Dos Box's title bar, and select "Properties", you'll see under the "Screen" tab that you can set the initial screen to display up to 50 lines of text. You can also set the font so that those 50 lines will fit neatly on your particular screen size.
Under the "Misc." Properties tab you'll see there's a "Background" option that lets you suspend, or allow the Dos Box to process in the background. As most PCs are quite quick these days, this isn't so important, but if you un-check the "Suspend" option then you can have Dos programs running "in the background".
D:\>type cmp.bat dhc11 amxy -ov b # @ <-- this disassembles ashc11 amxy.dis <-- this re-assembles BINCVT amxy.s19 -o=amxy.bim -ov <-- convert S19 to binary fc amxy.bin amxy.bim <-- compare original and new bonaries D:\>Dos has on-line help for batch files - type help batch for information.
There a millions of Dos programs, of various qualities, that will solve just about any problem you have. In addition, you don't have to buy the latest 800 Mhz Pentium V to run Dos, just a simple monochrome laptop will run most of these programs (people throw these laptops out because they think they need more processing power!).
If you're a Windows ONLY user, then taking the time to "learn Dos" will pay
dividends in the long run.
Statistics by www.digits.com
Shows approximate hits since 29th Aug 2001.
Home | DOS Tutorial Feedback | Copyright