Debug: N (Name)
Page updated January 21, 2005
Syntax
n [FileParameters]
Parameters
Remarks
- Windows XP and the Windows Server 2003 family of products do not use this command. It is included only to preserve compatibility with existing MS-DOS files, but it has no effect at the command line because the functionality is automatic.
-
Using the n subcommand
You can use the n subcommand in two ways. First, you can use it to specify a file to be used by a later l (load) or w (write) subcommands. If you start Debug.exe without naming a file to be debugged, you must use the command n FileName before you can use l to load the file. The file name is correctly formatted for a file control block (FCB) at CS:5C. Second, you can use n to specify command-line parameters and command-line options for the file that you are debugging.
- Memory areas
The following table lists the four areas of memory that can be affected by the n command.
Memory location Contents CS:5C File control block (FCB) for file 1 CS:6C File control block (FCB) for file 2 CS:80 Length of n command line (in characters) CS:81 Beginning of n command-line characters The first file name you specify for the n command is placed in an FCB at CS:5C. If you specify a second file name, this name is placed in an FCB at CS:6C. The number of characters typed on the n command line (exclusive of the first character, n) is stored at location CS:80. The actual characters on the n command line (again, exclusive of the letter n) are stored beginning at CS:81. Note that these characters can be any command-line options and delimiters that would be valid in a command typed at the command prompt.
- For information about loading the contents of a file or of specific disk sectors into memory by using the l (load) subcommand, see Related Topics.
- or information about writing the file that you want to debug to a disk by using the w (write) subcommand, see Related Topics.
Examples
debug prog.com
nparam1 param2
g
In this case, the g (go) subcommand runs the program as if you typed the following command at the command prompt:
prog param1 param2
Testing and debugging reflect a typical run-time environment for Prog.com.
In the following sequence of commands, the first n subcommand specifies File1.exe as the file for the subsequent l (load) subcommand, which loads File1.exe into memory. The second n subcommand specifies the parameters to be used by File1.exe. Finally, the g (go) subcommand runs File1.exe as if you typed File1 File2.dat File2.dat at the command prompt.
nfile1.exe
l
nfile2.dat file3.dat
g
Do not use the l subcommand after the second instance of the n subcommand. If you use the w (write) subcommand after the second instance of the n subcommand, File1.exe (that is, the file you are debugging) will be saved with the name File2.dat. To avoid this result, always use the first form of the n subcommand immediately before either an l or w subcommand.
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |
ome of these terms may be the same or similar to DOS commands. For information on DOS Commands, click here