Never realized INSTALLHIGH and LH were not documented. I recall using these, so I always assumed they were commonly known.
And :: for comments is just a creative trick based on how labels in batch files are parsed. It wasn't originally supposed to be used this way, so no wonder the documentation never mentioned it.
The difficulty in writing batch scripts was always that the best (or sometimes only) way of doing many things was to use a command originally intended for something completely different, in a completely non-intuitive way, and examples for such usage were never part of any official documentation. For example:
To display an empty line (instead of "ECHO is on"):
ECHO.
To create a file:
COPY CON FILE.TXT
Even now, the way to load the output of a command into a variable is to use FOR:
FOR /F %T IN ('TIME /T') DO SET TIME=%T
And the best way to empty a directory of all its contents is to use ROBOCOPY /MIR.
> Never realized INSTALLHIGH and LH were not documented. I recall using these, so I always assumed they were commonly known.
LH is documented in the MS-DOS 6.22 online help. "HELP LH" brings it up.
(The full name of the command is LOADHIGH, but LH is an acceptable abbreviation. The online help documents the LH abbreviation.)
(INSTALLHIGH by contrast wasn't documented... but LOADHIGH and DEVICEHIGH were. INSTALLHIGH is just putting a LOADHIGH in CONFIG.SYS instead of in AUTOEXEC.BAT)
> INSTALLHIGH is just putting a LOADHIGH in CONFIG.SYS instead of in AUTOEXEC.BAT
Yeah, and if anybody wonders what the point of this was: starting with DOS 6 you could have different boot profiles (menu items) in CONFIG.SYS. For example, depending on the program to run you'd want to have either extended memory (XMS via HIMEM.SYS), or expanded memory (EMS via EMM386.EXE) available.
INSTALL[HIGH]= allowed running different TSRs (roughly, background programs) for each profile from the same place (although in practice it was still common to have GOTO %CONFIG% in AUTOEXEC.BAT). Typical TSRs would include something like MSCDEX.EXE for CD-ROM support, SMARTDRV.EXE (disk cache), and a hardware-specific mouse driver (typically *MOUSE.COM).
If you had too many TSRs running at once there would be not enough base memory (the first 640 KiB) left, and some programs would refuse to start.
Writing this makes me realize we've really gone a long way.
I suspect ECHO. and COPY CON were in official docs, because I remember them quite well. I still have my old DOS 5.x reference manuals around here somewhere - I should check!
And :: for comments is just a creative trick based on how labels in batch files are parsed. It wasn't originally supposed to be used this way, so no wonder the documentation never mentioned it.
The difficulty in writing batch scripts was always that the best (or sometimes only) way of doing many things was to use a command originally intended for something completely different, in a completely non-intuitive way, and examples for such usage were never part of any official documentation. For example:
To display an empty line (instead of "ECHO is on"):
ECHO.
To create a file:
COPY CON FILE.TXT
Even now, the way to load the output of a command into a variable is to use FOR:
FOR /F %T IN ('TIME /T') DO SET TIME=%T
And the best way to empty a directory of all its contents is to use ROBOCOPY /MIR.