Tuesday, 16 December 2014

Break command in dos batch commands

No comments :

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 commandThey 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. 


Saturday, 13 December 2014

List of Internal Commnds

No comments :

List of Internal Commands

In the previous tutorial we learnt about type of commands and we discussed about internal commands and external commands. In this and next few tutorials are going on internal commands and there descriptions. 
List of Internal Commands:- 
There are about 34 internal commands DOS has. I am going to list all 34 commands here and from the next tutorials I will explain them one by one.
1. Break
2. Call
3. Cd
4. Chcp
5. CLS
6. Copy
7. Ctty
8. Date
9. Del
10. Dir
11. Echo
12. Exit
13. For
14. Goto
15. If
16. LFNFOR
17. LH
18. Lock
19. Md
20. Path 
21. Pause
22. Prompt
23. RD
24. REM
25. Ren
26. Set
27. Shift
28. Time
29. TrueName
30.Type
31. Unlock
32. Ver
33. Verify
34. Vol

These are all 34 internal commands which DOS offers. From the next tutorial we are going to explore them one by one.