Tuesday, 16 December 2014
Break command in dos batch commands
Break Command
Hello welcome back to learning DOS and batch commands. As I promised, from this tutorial to next ten tutorials we are going to learn some basic and very important internal dos commands which are listed in List of Internal Commands tutorial.
Our first command is Break Command. Lets get started.
Break command - disk access intercept control
The BREAK command is similar to synonymous configuration command. They both affect the same binary flag, which controls checks of BREAK and CTRL-C keystrokes during disk access operations. This binary flag doesn't lose its state when current resident module of command interpreter finishes its job, and local environment becomes lost. Contrary to the IO.SYS loader, the COMMAND.COM interpreter shows current state of the mentioned binary flag in response to the BREAK command entered without parameters.
2nd Command is CALL
CALL - BATCH FILE EXECUTION WITH RETURN
CALL is a command to execute one command from another. Batch files are non-formatted textual command files, from which the COMMAND.COM interpreter accepts an extended set of commands.The Call command is just one of those intended to be entered not from the keyboard, but only from line of batch file.
Each line in a batch file may include a name of an internal command, or a name of an external utility, or a name of another batch file as well. When command interpreter encounters a name of external utility, it transfers control to this utility, but takes control back after the utility finishes its job, and proceeds to the next line in the same batch file. However, batch files don't behave like ordinary utilities. Having found a name of a batch file (the secondary batch) in a line of another batch file (the primary batch), the COMMAND.COM interpreter begins execution of the secondary batch and doesn't return to the primary one. In order to enable a return to execution of the primary batch file, the secondary one should be launched with CALL command, for example:
CALL C:\DOS\VC4\Help.bat J 96
where :-
C:\DOS\VC4\ – An example of a path to HELP.BAT file. If path is omitted, the file will be searched for inside current directory and then according to all path(s), specified by PATH variable.
Help.bat – an example of a name for the secondary batch file.
J 96 – specific parameters to be transferred to HELP.BAT file (other batch files may need other parameters or may not need them at all).
3rd Command is CD.
CD- Change Directory
When disk and path are not specified in command line, then MS-DOS implies presence of the addressed object in default (current) directory of the default (current) disk. Default directory assignment is performed by CD command.The CD command enables to change current directory on any disk (but not the current disk itself) according to a specified path. For example, command
CD C:\DOS
will set current directory \DOS, if the current (default) disk is disk C:. CD command may be addressed to a disk, which is not the current one, but then specified path is taken into account as a preset, which will become the current (default) directory later, when the disk, specified in CD command, will be given status of the current disk.
The path in CD command may be expressed in any of its allowed forms. The final word in the path must be either a name of target directory or any combination of alias signs. Such combinations enable to perform transition into the root directory ( CD \ ), into parent directory ( CD .. ), to climb two levels up along the directory structure ( CD ..\.. ) and so on.
CD command without path specification, for example
CD C:
shows a path to the current directory on the specified disk.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment