Differences between COMMAND /C and CALL (34768)
The information in this article applies to:
- Microsoft MS-DOS operating system 3.1
- Microsoft MS-DOS operating system 3.2
- Microsoft MS-DOS operating system 3.21
- Microsoft MS-DOS operating system 3.3
- Microsoft MS-DOS operating system 3.3a
- Microsoft MS-DOS operating system 4.0
- Microsoft MS-DOS operating system 4.01
- Microsoft MS-DOS operating system 5.0
- Microsoft MS-DOS operating system 5.0a
- Microsoft MS-DOS operating system 6.0
- Microsoft MS-DOS operating system 6.2
- Microsoft MS-DOS operating system 6.21
- Microsoft MS-DOS operating system 6.22
This article was previously published under Q34768 SUMMARY
The following information details the differences between using COMMAND /C
and CALL.
MORE INFORMATION
COMMAND /C loads a new copy of COMMAND.COM into main system memory and
passes it the command line. If a terminate-and-stay-resident (TSR) program
is installed from this new copy of COMMAND.COM, it will be loaded above
COMMAND.COM. When you exit from the command shell, the memory used by
COMMAND.COM is freed, but the memory used for the TSR program is not.
Hence, system memory becomes fragmented; there is memory allocated for TSR
programs located in the middle of free memory.
When you do a CALL command, MS-DOS does not load a new copy of COMMAND.COM;
it just uses an internal stack to keep track of different batch files.
Therefore, if a TSR program is loaded, it is loaded at the bottom of
memory, just above the resident portion of COMMAND.COM; all free memory
remains in a single, contiguous block, which makes it easier for MS-DOS to
work.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | KB34768 |
---|
|