home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
util4
/
4dos301.lzh
/
UPDATE30.DOC
< prev
next >
Wrap
Text File
|
1990-05-22
|
56KB
|
1,335 lines
4DOS Update Documentation
Version 3.01, 5/22/90
Copyright 1989, 1990, J.P. Software. All Rights Reserved. Published by
J.P. Software, P.O. Box 1470, E. Arlington, MA 02174 USA, (617) 646-
3975.
This file provides:
* General information on features changed between version 2.2 and
3.0;
* Details on features changed and bug fixes between versions 3.0 and
3.01;
* Corrections to the version 3 manual, due to either typographical
errors or new features added after the manual went to press.
Changes between versions 2 and 3 of 4DOS were so extensive that we can
only note them here. Information here about those changes is NOT in-
tended to be complete documentation on their syntax, operation, or
usage, but only to introduce them to experienced users. Read the appro-
priate part of the manual before using any new feature of 4DOS.
The following marks are used to identify items in this file:
--> CAUTION: This change may require modifications to your ex-
isting batch files, aliases, commands, or common methods of
using 4DOS. Check these carefully when replacing an earlier
version of 4DOS with 4DOS 3.01.
3.01 This item is new or has been modified for version 3.01.
Items without this mark explain changes between versions 2.2
and 3.0.
[p nn] This item corrects or adds to the information in the version
3 manual, on page "nn". Some manual corrections have been
made since version 3 was released, so some of these changes
may already be present in later versions of the manual.
We have made every effort to insure that this file is as accurate as
possible, but we cannot guarantee that every single change is included.
This file is formatted at 58 lines per page, and contains form feeds and
page footers. It can be printed properly on most PC printers using the
command:
copy update30.doc prn
Printing it with a program that formats the pages is not likely to work
due to the formatting included in the file.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 1
Table of Contents
Installation and Configuration . . . . . . . . . . . . . . . . . . 4
General Enhancements . . . . . . . . . . . . . . . . . . . . . . 4
Automatic Installation . . . . . . . . . . . . . . . . . . . . . 4
Command Line Options . . . . . . . . . . . . . . . . . . . . . . 4
Features and Usage . . . . . . . . . . . . . . . . . . . . . . . . 7
General Features . . . . . . . . . . . . . . . . . . . . . . . . 7
Command Line Editing . . . . . . . . . . . . . . . . . . . . . . 8
Command Parsing . . . . . . . . . . . . . . . . . . . . . . . . 8
Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Batch Files . . . . . . . . . . . . . . . . . . . . . . . . . . 9
I/O Redirection . . . . . . . . . . . . . . . . . . . . . . . . 10
Environment Variables . . . . . . . . . . . . . . . . . . . . . 10
Technical Information . . . . . . . . . . . . . . . . . . . . . 12
Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
ALIAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
ATTRIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
BEEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
CD and CDD . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
CLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
COLOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
COPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
CTTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DELAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DESCRIBE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DRAWBOX, DRAWHLINE, DRAWVLINE . . . . . . . . . . . . . . . . . 15
ESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
FOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
GLOBAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
GOTO and GOSUB . . . . . . . . . . . . . . . . . . . . . . . . . 16
HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
HISTORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
IFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
INKEY: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
KEYSTACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
LOADBTM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
MEMORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
MOVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
PATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
PROMPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
PUSHD / POPD . . . . . . . . . . . . . . . . . . . . . . . . . . 22
QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
REM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4DOS 3.01 [5-22-90] UPDATE30.DOC page 2
REN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
SCRPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
SELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
SETDOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
SWAPPING . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
UNSET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4DOS 3.01 [5-22-90] UPDATE30.DOC page 3
Installation and Configuration
------------------------------
This section discusses changes in the way 4DOS is installed and config-
ured on your system. It is not an explanation of how to install your
upgrade to version 3.01 (for that see README.DOC). For more information
on new features of version 3.0 see pages 9 - 26 of the manual.
General Enhancements:
The 4DOS loader (4DOS.COM) has been completely rewritten. It now
takes only 3K of low memory (less than COMMAND.COM!).
4DOS now supports swapping to XMS extended memory.
The resident portion of 4DOS and the master environment can now
be loaded high if your hardware and software support XMS Upper
Memory Blocks (UMBs). If both options are used 4DOS's low-memory
footprint can be reduced to as little as 256 bytes.
4DOS.COM checks processor types more carefully when loading the
EXE file. On NEC V20/V30 systems it will now load 4DOS286.EXE,
which is compiled to run properly on the V20 and V30.
The loader now displays the size of the swap area in K.
3.01 Disk swapping should no longer cause occasional system hangs if
the Ctrl-C or Ctrl-Break key is hit while 4DOS is swapping itself
in from disk (i.e. when exiting an application).
3.01 CLS, LIST, and SELECT are no longer affected by a video BIOS bug
in old IBM PCs.
Automatic Installation:
[p 13] The command to start automatic installation has been
changed to:
x:install x y
where "x" is the drive the 4DOS disk is in, and "y" is the drive
on which you want to install 4DOS. See README.1ST for more de-
tailed instructions if you need them.
Command Line Options:
All the items below refer to information on pages 21 - 23 of the
manual.
General changes:
4DOS 3.01 [5-22-90] UPDATE30.DOC page 4
--> The minimum and default values for history and environment
size have been changed slightly.
3.01 [p 21-23] Either / or - may be used as the switch character
on the 4DOS command line (eg SHELL=4DOS -S:E instead of /S:E,
etc.).
Option files (@filename):
The new @filename option allows you to put 4DOS options into
a disk file instead of specifying them on the SHELL= line in
CONFIG.SYS. This gets around a bug in DOS which limits the
length of the SHELL= line.
[p 21] The file specified in the "@filename" option can have
more than one line, and is limited to a total of 255 charac-
ters in the file, not 128. A file invoked with @filename can
have another @filename inside it. Wherever @filename occurs,
all options placed after it are ignored, so it must be the
last item present.
Alias size (/A):
--> Aliases are now in a separate block, whose size in bytes is
defined with the new SHELL and 4DSHELL parameter /A:nnnn.
You will need to add this parameter, and probably reduce your
environment size accordingly.
[p 21] The /A switch supports the same incremental syntax
used with /E, i.e. /A+n. When used in 4DSHELL this allows
you to guarantee a specified amount of free alias space in
secondary shells.
Environment size (/E):
--> 4DOS now defaults to a memory-resident master environment
(formerly selected with the /M command line option). The /M
switch is therefore obsolete, but will still be accepted. It
is equivalent to /E.
[p 21] /E:nnnn may also be followed by S (/E:nnnnS) to swap
the master copy of the environment; this is equivalent to the
4DOS version 2 /E option. This will save a small amount of
low memory, but may not be compatible with all applications,
and will not work with any application that needs to modify
the master environment.
/E:nnnn may be followed by U (/E:nnnnU) to load the master
environment into a UMB in high DOS memory. This switch is
subject to the same compatibility restrictions as /U (below).
4DOS 3.01 [5-22-90] UPDATE30.DOC page 5
Reduced swap size:
[p 22] 4DOS will normally reduce the space used to swap a
secondary shell by retrieving static information from the
primary shell's swap area. This reduces secondary shell swap
size from 68K or more to about 20K. This feature will not
work if the total of your alias, history, and environment
sizes in the secondary shell is larger than that specified
for the primary shell, or if the size of DOS memory has been
reduced when the secondary shell is started (e.g. by a pro-
gram like DESQView that reserves some memory at the top end
of DOS memory). In such cases secondary shells will require
a full-size swap area. The size of the swap area is dis-
played in the "swapping initialized (nnK)" message when 4DOS
starts.
Disk swapping (/S:D):
3.01 [p 22] The default location for disk swap files in secondary
--> shells is now in the root directory of the drive specified in
the COMSPEC environment variable (the drive where 4DOS.COM is
stored). If you want disk swap files to go to another drive
or directory, use the "/S:Bd:\path" or "/S:Dd:\path" settings
in the 4DSHELL environment variable (see page 25 of the manu-
al). This should cut down on swap file clutter, yet leave
you with complete control over swap file location.
Load high (/U):
The new /U switch requests that 4DOS load its resident por-
tion into an Upper Memory Block (UMB) at the high end of DOS
memory, reducing low memory usage to 256 bytes.
3.01 [p 23] The /U switch requires 386MAX, QRAM, or QEMM 5.0 or
above. It may not be compatible with all other software
products. See COMPAT.DOC for full details on compatibility.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 6
Features and Usage
------------------
This section discusses changes in 4DOS features and usage which are not
specific to a particular command and which are not related to installa-
tion and boot.
General Features:
--> Commands that accept multiple arguments (COPY, MOVE, DEL, etc.)
no longer abort on an error - they continue processing the re-
mainder of the arguments, then return an error. For example, DEL
*.BAK will continue when a read-only file exists among the .BAK
files and cannot be deleted.
The ctrl-C / ctrl-Break handler has been cleaned up and should be
more reliable.
--> 4DOS supports the DOS 4.0 DOSSHELL command without the use of
special batch files, COMMAND.COM, etc.
The program name passed to DOS for external programs is now set
to upper case. This should reduce errors from application pro-
grams trying to find their files and other similar problems.
--> The date, time, and thousands separator characters are now set by
the default country definition (in DOS 3+). Previously the coun-
try definition only affected the date and time format.
[p 29] The command history is now automatically passed to sec-
ondary shells. It is passed in one direction only, i.e. addi-
tional commands entered in the secondary shell will not be passed
back to the primary shell. To disable this option, place a HIS-
TORY /F command in your 4START file.
3.01 4DOS now has better support for non-English characters in file-
names, environment variables, and aliases.
3.01 Most of the changes in version 3.0 to allow shareable file access
--> on networks have been removed, because some networks and a few
popular programs (e.g. SHARE and FASTOPEN) couldn't handle them
properly. SHARE/LAN support is now provided where possible, but
is avoided in many places where it has been found to cause trou-
ble. This change should eliminate most or all I/O redirection
problems on networks.
3.01 A number of changes have been made to increase 4DOS's execution
speed, and reduce its size slightly. Speed improvements are
primarily in the areas of file access (particularly .BAT files),
and environment variable and alias expansion. They may not be
noticeable on higher-speed systems.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 7
3.01 4DOS can now correctly handle text files (.BAT or .BTM files,
files to be LISTed or TYPEd, etc.) which have CR/LF, CR only, or
LF only at the end of each line. Previously not all of these
line terminators worked correctly.
Command Line Editing:
The ^D (delete) command now displays the previous history command
after deleting the current one.
A new command, ^E (end), moves to the last entry in the history
list and displays it.
Filename completion (F9 / F10 keys) has two changes:
* The F8 key will now return the previous matching filename
if you go past the filename you want in the list.
--> * When scanning the directory for filename completion 4DOS
now starts with the name you type (if any) and appends a
"*.*" if no extension is given (as it used to), or a "*" if
an extension is given (that's the new part). This makes
names like "FILE.E" expand as "FILE.E*".
3.01 [p 28] You can now enter characters that would normally be in-
terpreted by the line editor as a command (e.g., Ctrl-D or Ctrl-
K). To do so precede the character with an ASCII 255 (hold down
the ALT key and enter 255 on the numeric keypad, then release the
ALT key). To enter the ASCII 255 itself into the line, you must
enter it twice.
3.01 The cursor shape will now be changed properly when you hit the
Ins key to switch editing modes. Previously if SETDOS specified
a block cursor in the default mode it would not be changed to an
underline when Ins was hit.
Command Parsing:
The command line parser has been completely rewritten. (The
parser is the part of 4DOS that reads your commands and analyzes
them for aliases, environment variables, program names, switches,
etc.). It now supports multiple commands and redirection more
gracefully. Specific changes are listed below:
--> * When entering multiple commands on the line, each command
is parsed just before it is executed. Previously all com-
mands on the line were parsed before any of them were execut-
ed.
--> * As a result, environment variable and alias changes made in
one command now take effect immediately, and will affect the
parsing of commands later on the same line. Previously these
4DOS 3.01 [5-22-90] UPDATE30.DOC page 8
changes did not take effect until the entire line had been
parsed.
--> * EXCEPT, FOR, GLOBAL, IF, and SELECT now accept aliases as
the command argument.
Filename parsing has been modified to allow a forward slash ("/")
as a path separator in most places. However commands which use
"/" for switches may still get confused if you use this con-
struct.
--> "Whitespace" (delimiter) characters (;=,) following the command
name are no longer skipped for the first command line argument.
This allows commands like "XYZ,,,,," to pass white space charac-
ters like the comma correctly to an external program.
You can disable the saving of a specific command to the history
list by prefacing the command with "@".
--> Filenames ending with a "\" are now assumed to be directory
names, i.e., "C:\4DOS\" is equivalent to "C:\4DOS\*.*". This
allows you to force 4DOS to consider something to be a directory
name rather than a file name if there may be ambiguity.
--> Alias expansion will now take place even when the first item on
the line is an environment variable. Previously executing "%var"
as a command would not work when the variable contained an alias
name.
ECHOing of the command line now occurs before piping. This al-
lows commands like "echo y | del *.*" to work when ECHO is on.
Aliases:
--> Alias expansion has been changed slightly. Previously, if you
had variables in an alias (%1, %2, ...) then once variable sub-
stitution was complete 4DOS would discard the remainder of the
command line. Now, 4DOS discards the command line up to and
including the highest referenced variable, and appends the rest
of the line to the end of the expanded command.
3.01 Fixed a bug in alias expansion which occurred when a "%" was the
last character on the line.
Batch Files:
A new extension to support "in memory batch files" has been added
(.BTM = "batch to memory"). See pages 33 - 34 of the manual for
details.
4START can now be a .BAT or .BTM file.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 9
--> Batch file variable %0 now returns the batch file name as it was
entered on the command line, in upper case, just like
COMMAND.COM. This should fix compatibility problems with some
installation batch files.
The %# variable has been added to batch files. It returns the
number of command line arguments (%1 - %n).
3.01 See the commands section below for information on the new LOADBTM
command, which allows any batch file to work as a BTM file some
or all of the time.
3.01 [p 33-34] Batch files can now be nested 6 levels deep (the
--> previous limit was 4).
I/O Redirection:
--> [p 43-44] Redirection is now fully nestable. For example, in-
voking a batch file XYZ with "XYZ > OUT.DAT" will redirect all
output from the batch file to OUT.DAT unless additional redirec-
tion is encountered within the batch file.
--> The EXCEPT, FOR, GLOBAL, and SELECT commands now handle I/O redi-
rection when processing begins for the second command (previously
it was handled when the EXCEPT, FOR, GLOBAL, or SELECT was pro-
cessed). In FOR, this allows you to redirect output to a file
whose name depends on the FOR variable, for example:
for %i in (s1 s2 s3) dir \%i\*.* > %i.lst
Redirection of STDERR only has been added.
3.01 4DOS now checks for duplicate redirection (i.e., "DIR > 1.DAT >
2.DAT"). Previously duplicate redirection could hang the system.
3.01 The system will no longer hang if a command specifies input redi-
rection after output redirection.
Environment Variables:
--> VERY IMPORTANT: The 4DOS internal variables (CWD, CWDS, DOSVER,
etc.) are now prefixed with an underscore (_). This should re-
duce conflicts with your own environment variables of the same
name. You must modify any batch files or aliases which use these
variables or they will not work properly with 4DOS 3.0. The only
variables 4DOS uses which are NOT prefixed with an underscore are
the ones which are actually inserted in the environment: PATH,
COMSPEC, 4DSHELL, TMP, etc.
The new syntax %[varname] will accept any sequence of characters
as a valid environment variable name for expansion. This will
override both the assumption that a variable is a batch or alias
4DOS 3.01 [5-22-90] UPDATE30.DOC page 10
argument if it starts with a digit, and the restrictions on what
characters are normally considered part of a variable name.
The '$' character has been added to the valid variable name char-
acter list.
3.01 [p 40] In order to support subtraction in the new %@EVAL func-
--> tion (see below) 4DOS will no longer accept a "-" in the name of
an environment variable to be expanded, unless the name is en-
closed in brackets [].
--> Many new internal variables have been added. An up to date list
of all variables includes those listed in the manual, plus those
listed below.
3.01 [p 41] Three new internal variables have been added:
%_dow The day of the week as a string (Mon,
Tue, etc.)
%_rows The height of the screen
%_columns The width of the screen
--> Variables you insert into the environment with SET or in any
other way now override 4DOS internal variables of the same name
(%_CWD, %_DATE, etc.).
[p 42] A new internal "function variable" type has been added.
These functions allow you to parse strings, perform arithmetic,
etc. See the manual and items below for full details. There are
a few minor errors or points which are not clear in the list of
variable functions in some versions of the manual:
* When using variable functions they must be preceded (and
optionally followed) by a percent sign, like all other envi-
ronment variables. For example the "ext" function is refer-
enced as %@ext[filename] or as %@ext[filename]%.
* The correct spelling for the string length function is
"%@len", not "%@length".
* The %@line function is missing from early copies of the
manual. This function returns the nth line of a file. The
first line of the file is numbered 0.
* In the %@substr function, the first character is numbered
0, and the correct syntax is "%@substr[string,start,length]"
not "%@substr[string,start,end]".
3.01 [p 42] A new function, %@eval, has been added. The syntax is:
%@eval[expression]
Where "expression" is any arithmetic expression. The expression
can include any of the following elements:
4DOS 3.01 [5-22-90] UPDATE30.DOC page 11
parentheses, which may be nested
unary + or - operators
multiplication and division operators: *, /, and %% (modulo)
addition and subtraction operators: + and -
environment variables, variable functions, and constants
The elements of an expression are processed with the precedence
shown above. For example, 5*3+2 is treated as (5*3)+2 rather
than 5*(3+2). Examples of the use of %@eval are:
Increment a variable: set a=%@eval[%a+1]
Perform environment variable arithmetic:
set c=%@eval[(%a*2) + (%@len[%b]-5)*7]
Evaluate expressions in IF:
if %@eval[%@substr[%_time,0,2] %% 12] == 0 echo 12:00!
Set up a simple command line calculator:
alias calc `echo The answer is: %@eval[%&]`
3.01 [p 42] Another new function, %@INDEX[string1,string2] returns
the position of string2 within string1 (string2 can be as small
as a single character). The first position in string1 is num-
bered 0. If there is no match, the function returns -1.
3.01 [p 42] When expanding environment variables 4DOS will display a
"Variable loop" error if you nest variable functions too deep, or
define variables which refer back to themselves.
Technical Information:
(All items here go with the technical information on page 149 of
the manual.)
4DOS.COM has been modified to set the PSP memory size, rather
than relying on DOS to do it properly. This allows 4DOS's swap-
ping mode to work properly in the OS/2 compatibility box.
The critical error and ctrl-C / ctrl-break handlers are now in
low memory all the time. This should solve some compatibility
problems with programs that wanted these handlers to be in low
memory and/or to have their addresses fixed, rather than changing
each time an application was run.
4DOS now hooks interrupt 2E (in the primary shell only). Some
programs use this to find the root command processor and/or glob-
al master environment. Note 4DOS does NOT process INT 2E in any
way, it just returns. But it does hook it.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 12
3.01 4DOS.COM now closes file handles 5 - 29 when it starts. This
should solve problems with programs that pass open file handles
to a secondary shell.
3.01 4DOS now generates two different INT 2F calls to allow TSRs to
tell when 4DOS is back at the prompt. These calls have AX =
D44Eh. The first occurs immediately before displaying the
prompt, with BX = 0; the second occurs after displaying the
prompt and immediately before accepting keyboard input, with BX =
1. Any routine intercepting these calls should preserve at least
the SI, DI, BP, SP, DS, ES, and SS registers.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 13
Commands
--------
This section describes the changes made to specific commands. Note that
some commands are also affected by the general changes in the "features
and usage" section above.
ALIAS: Lines beginning with a colon (":") are now ignored in
ALIAS /R files; this allows you to add comments to the files.
3.01 ALIAS: ALIAS /R can now read multiple files, for example:
alias /r alias1 alias2 alias3
--> ATTRIB: No longer changes subdirectory attributes unless the new
/D(irectory) switch is used.
BEEP: Now uses the default duration of 2/18 second if no dura-
tion is specified. Will no longer hang with the speaker on when
a task switch occurs in a multitasking system (DESQView, VM/386,
etc.).
CD and CDD: Added support for Netware-like arguments "..." to
change to the directory two levels up, "...." to go three levels
up, etc.
3.01 [p 57-58] CD and CDD: Modified to allow forward slashes (/) in
path names.
CLS: Now allows color specification if an ANSI driver (ANSI.SYS
or equivalent) is installed, e.g. CLS BRIGHT WHITE ON BLUE.
COLOR: This is a new command to set the screen colors. You must
have an ANSI driver (ANSI.SYS or equivalent) loaded.
--> COPY: Three switches have been added: /Q(uiet) to turn off the
display of files copied, /R(eplace) to prompt before overwriting
an existing file, and /U(pdate) to copy the file only if the
target doesn't exist or is older than the source. Also /A and /B
are now COMMAND.COM-compatible; see the manual for exact details.
3.01 [p 62-64] COPY: There are several changes:
Problems with appending files in binary mode have been fixed.
The way that COPY accesses files has been modified to mini-
mize or eliminate problems with the MS-DOS APPEND command.
The /R and /U switches are now ignored if the target is a
device.
A ^Z (end of file mark) is now properly added to the target
file when it is in ASCII mode.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 14
--> CTTY: Now uses the DOS get line call (INT 21h function 0Ah) to
get input. This should permit crude line editing with the back-
space and ESC keys.
DEL: Two switches have been added. /Q(uiet) turns off the dis-
play of files deleted. /Y(es) skips the "Are you sure" prompt
for commands like "DEL *.*" -- use it with caution!.
3.01 [p 66] DEL: Speed has been improved somewhat, especially on
non-cached disks.
DELAY: This is a new command. It waits specified number of
seconds and then continues; it can be used to delay for an exter-
nal event in a batch file.
--> DESCRIBE: This command now lists only normal and read-only files
and directories, and does not list hidden / system files.
3.01 DESCRIBE: 4DOS description files will no longer get mixed up
between directories when running reasonably-behaved data pathing
utilities like DPATH.
DIR: There are many changes:
/4 is a new switch to give a 4-column directory display.
--> /A(ttrib) display format has been changed to use standard 1-
column format.
--> /V(ertical) sort now creates newspaper-style columns when
invoked along with /2, /4, or /W and /P(ause). Previously
DIR /2VP (for example) would create two long columns, not
divided by page.
DIR now has an "include list" format, e.g. DIR *.WKS+*.DAT to
display all specified files in one list.
The number of files DIR can handle is now limited only by
available memory. The previous limit was just over 1000
files.
--> If the file time is exactly 00:00:00 no time is displayed,
just like under COMMAND.COM.
3.01 DIR: Changed to display directory totals even when the "File not
found" message is displayed. Changed the /F and /H switches so
they don't conflict with each other.
DRAWBOX, DRAWHLINE, DRAWVLINE: These new commands draw boxes and
lines on the display. Color control is included, and connectors
are generated automatically when two lines intersect.
3.01 DRAWBOX: Styles 3 and 4 now work properly.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 15
ESET: When editing aliases with truncated names (i.e. those with
a "*" in the name) the whole alias is now displayed.
FOR: There are several changes:
--> Single-character FOR variables will now work properly with
text appended to the variable name (e.g. FOR %%X IN (A B C)
DO COPY %%Xfile D:). This more accurately emulates
COMMAND.COM, which only allows FOR variables to be 1 charac-
ter long.
The DO in the FOR syntax is now optional.
FOR variables may now be specified either as %%var or %var,
whether the command is issued at the prompt or from a batch
file.
3.01 FOR: Now aborts when a nested batch file CANCELs. Also, fixed a
bug that was causing FOR variables to be ignored inside double
quotes.
3.01 [p 83] GLOBAL: Added a /Q(uiet) switch to disable the display
of "GLOBAL: pathname".
--> GOTO and GOSUB: These commands now take effect immediately when
there are multiple commands on a single line.
3.01 [p 85] GOTO inside an IFF statement now cancels all IFF parsing,
--> and assumes you've branched completely outside the IFF construct.
If you haven't, you will get "Unknown command" errors on subse-
quent ELSE, ELSEIFF, and ENDIFF statements (see examples below).
Also fixed a bug which prevented GOTO from branching to the end
of the file from within a GOSUB subroutine.
iff "%1"=="Y"
:test
copy file1 a:
goto done <--- Legal - branches outside the
else IFF block
copy file2 b:
goto test <--- Illegal - branches within IFF
endiff block
[do some other work here]
:done
[p 86] HELP: The HELPCFG.EXE program, provided with 4DOS, can
be used to configure the help system display colors. To use it,
change to the directory HELP.EXE is in, be sure HELPCFG.EXE is in
the same directory, and enter the command:
HELPCFG
HELPCFG allows you to set the colors for several different por-
tions of the help display. Use the vertical arrows to select
4DOS 3.01 [5-22-90] UPDATE30.DOC page 16
which type of display color you wish to adjust. Hit <cr> and you
will be able to move a box in the left-hand window to select the
color. Hit <cr> again to select the color, or Esc to return to
the right hand window without changing the color. Another Esc
will save the new colors and return you to DOS.
3.01 [p 86] HELP: There are several changes to HELP:
* There are many corrections and additions to the text, in-
cluding a complete ASCII table.
* A new "soft pagination" capability enables many commands to
be displayed completely on one screen if using more than 25
lines, but paginates in a logical spot if using a 25-line
screen.
* HELP is now DESQView-aware and should run properly in a
less than full screen DESQView window.
* HELP now accepts up to 16 pages per topic and 32 cross-
references per topic, to allow 4MAKE users to install longer
topics inside the help file.
* Three new environment variables have been added to give you
better control over HELP:
4HELP Specifies the full path and file name for the
help program to be loaded when F1 is pressed.
If not used, 4DOS will look for HELP.EXE in
the current directory and then on the PATH.
4HELP affects only F1, NOT the HELP command;
if you need to change how the HELP command
works as well, use an alias (see example
below).
4HELPF Specifies the full path and file name for the
help text file. If not used, HELP will
search for DOS.HLP in the directory specified
in 4HELP (if any), then in the current direc-
tory and on the path.
4HELPC Specifies control switches for HELP.EXE. At
present the only switch is /R, which disables
dynamic window resizing and forces all text
screens to be displayed at the full screen
height.
For example, the following commands load HELP.EXE (which has
been renamed to 4DHELP.EXE) from directory D:\4DOS when F1 is
pressed, set up an alias to load this same program when the
HELP command is used, load the help text file from RAMdisk
drive I:\, and disable dynamic window resizing:
set 4help=d:\4dos\4dhelp.exe
4DOS 3.01 [5-22-90] UPDATE30.DOC page 17
alias help d:\4dos\4dhelp.exe
rem The above could also use "alias help %[4help]"
set 4helpf=i:\dos.hlp
set 4helpc=/r
HISTORY: A new switch, /R(ead) allows you to read the history
from a file (for example, one created with HISTORY > filename).
IF: There are many new IF conditions; see the manual for de-
tails.
3.01 [p 88-90] IF: There are several corrections to the description
in the manual. Some of these errors are present only in early
copies of the manual:
* The DOS memory size option is named DOSMEM, not DOSFREE.
* The tests which check a numeric value (EMS, DOSMEM, etc.)
use the same relational operators as the string tests, as
shown in the examples. For example, the syntax for EMS
should read:
EMS relop n[K|M]
where "relop" means EQ, GE, GT, etc. The "relop" is optional
for ERRORLEVEL, but required for all other numeric tests.
* The MONITOR and VIDEO tests also require a relational oper-
ator (==, EQ, or NE) as described above for numeric tests.
* The IF ATTRIB test has an additional option: "N" tests for
no attributes set (i.e. all of the other attributes are off).
* IF ATTRIB volname V will only work if the volume name re-
fers to the root directory, and if there is a period after
the eighth character in volume names of nine characters or
more (e.g. to test for volume "MYFILES0107" in drive A:, use
IF ATTRIB A:\MYFILES0.107 V ...).
* Two tests are missing from some copies of the manual:
IF DISKFREE relop n
Tests the disk free space on the current drive.
Cannot be used to test other drives.
IF FILESIZE filename relop n
Tests the size of the specified file.
For example:
if diskfree gt 40M echo Plenty of room
if filesize myfile.dat gt 360K echo It won't fit!
4DOS 3.01 [5-22-90] UPDATE30.DOC page 18
3.01 [p 88-90] IF: String comparisons will now be done numerically
if both values being compared begin with a digit. This allows
you to do true arithmetic tests. For example:
set aa=027
set bb=20
if %aa gt %bb ... This test will succeed because it
will compare the numeric values 27
and 20.
if "%aa" gt "%bb" ... This test will fail because it will
compare the alphanumeric values
"027" and "20", and the "02" will
appear 'smaller' (alphanumerically)
than "20".
3.01 IF: The ATTRIB test for a volume label has been changed to get
around a bug in DOS, and should now recognize labels correctly.
IFF: This is probably the single most powerful new feature of
version 3.0. It is a block-structured command allowing IFF /
THEN / ELSE / ELSEIFF structures in batch files and aliases. The
syntax is straightforward:
IFF condition then
command(s)
ELSE[IFF]
command(s)
...
ENDIFF
See the manual for further details.
3.01 IFF: ELSE and ENDIFF will now be recognized properly even if
they are not followed with whitespace.
INKEY: A new switch has been added, /Wn (wait), to wait up to n
seconds for a reply.
INPUT: A /W has switch has been added as for INKEY.
3.01 INPUT: Fixed a bug with very long variable names and/or input
text.
KEYSTACK: A longstanding bug has been fixed. KEYSTACK was ran-
domly trashing a word somewhere in memory. This fix may help
with some rare compatibility problems.
3.01 [p 94] KEYSTACK: There are two changes:
* KEYSTACK now supports a new symbol, !, to clear keystrokes
from the typeahead buffer, as well as anything in the
KEYSTACK buffer. For example:
keystack ! @59
4DOS 3.01 [5-22-90] UPDATE30.DOC page 19
will clear the typeahead buffer before stacking the @59 (F1)
keystroke.
* Some programs will not interpret stacked keystrokes proper-
ly unless they contain both the correct ASCII value and the
correct keyboard "scan code". For example, if you attempt to
KEYSTACK an "Enter" using ASCII code 13 (carriage return) and
see a small musical note instead, the program you are running
probably needs the scan code to interpret the keystroke prop-
erly.
KEYSTACK now supports the entry of scan codes for standard
ASCII keys. To enter the scan code, multiply it by 256 and
add it to the ASCII code. Using the same example, the scan
code for the Enter key is 28, so the full value for this key
would be 28*256+13 = 7181. With some programs you will find
that KEYSTACK 7181 works when KEYSTACK 13 does not (or vice
versa). Experimentation is required to get the correct val-
ue. A full discussion and table of scan codes is beyond the
scope of this document, but is available in many basic PC
books.
LIST: There are several changes:
There are two new switches. /S gets input from standard
input instead of a file. /W wraps all lines at the right
side of the screen, for viewing non-text files.
EGA and VGA display speed has been increased.
The Ctrl-Right Arrow and Ctrl-Left Arrow keys can now be used
to shift left or right 40 columns at a time.
3.01 [p 95] LIST: There are several changes:
--> Changed the search and print keys to use letters instead of
function keys: F(ind), N(ext), and P(rint). This avoids
conflicts when you wish to redefine the function keys for
other purposes.
Added a new switch, /H, to strip the high bit of each charac-
ter, for displaying WordStar documents and other similar
files.
3.01 [p 96] LOADBTM: This is a new command. It will switch the
current batch file to and from .BTM mode. The syntax is:
LOADBTM [ON | OFF]
LOADBTM ON loads the entire file into memory and processes the
following lines as a .BTM file. LOADBTM OFF unloads the file
from memory and processes the following lines one by one like a
.BAT file. Both commands can be used regardless of the file's
original extension.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 20
LOADBTM will allow you to have a single batch file for both
COMMAND.COM and 4DOS, and select .BTM mode via a statement like:
if "%@eval[2+2]" == "4" loadbtm on
Since the %@eval function does not exist under COMMAND.COM, the
IF test will fail there and the rest of the line will be ignored.
Under 4DOS where %@eval exists, the LOADBTM ON will be executed.
LOADBTM will also allow you to load TSRs from a .BTM file by
switching it into .BAT mode, loading the TSRs, and switching back
to .BTM mode. However note that, depending on what the file
does, such mode switching can erase much of the speed gained by
using a .BTM file in the first place.
LOG: This is a new command which allows you to log all commands
entered at the prompt to log file, with date and time stamps.
You can enable or disable logging, write text to the log file,
and set its name.
3.01 LOG: Fixed a problem which caused a ^C to occasionally hang the
system when LOG was ON. Also changed LOG to automatically switch
LOG OFF if it couldn't open the log file.
MEMORY: The display includes several new items; see the manual
for details.
MOVE: There are two new switches: /Q(uiet) turns off the dis-
play of files moved; /R(eplace) prompts before overwriting an
existing file.
3.01 MOVE: Now returns an "Access denied" error if you try to move
files to a character device. Also the way that MOVE accesses
files has been modified to minimize or eliminate problems with
the MS-DOS APPEND command.
PATH: The path is now saved in upper case to work around a No-
vell Netware bug.
PROMPT: Now checks for a null current directory to prevent dis-
playing garbage when the current drive is changed to a drive that
isn't ready. Also there are some changes to the "$" strings:
--> $a (ampersand) has been removed to avoid a problem with
ProComm. If you need an ampersand in your prompt, just use
the "&" character instead of $a.
$xd: is a new function which displays the current directory
for the specified drive. For example, to display the current
directory on drive E:, include $xe: in the prompt string.
$Xd: is the same, but in upper case.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 21
$z is a new function which displays the 4DOS shell nesting
level (0 for the primary shell, 99 for memory-resident copies
of 4DOS).
--> PUSHD / POPD: The directory stack now discards the oldest en-
tries when full and "wraps around" -- previously an error was
generated if the directory stack overflowed. Also, PUSHD now
supports Netware-like args "..." etc., as in CD and CDD.
3.01 QUIT: Fixed a bug which kept 4DOS from QUITting within a GOSUB
subroutine.
--> REM: Remarks are now parsed before alias and variable expansion,
so you can have unmatched quotes in the REM statement without an
error message.
3.01 REM: Will now be echoed if ECHO is ON.
REN: The new /Q(uiet) switch turns off the display of the files
renamed.
SCRPUT: This new command to writes text directly to the screen,
and includes color control and cursor positioning.
SELECT: There are several changes:
--> Files can now be marked with the spacebar, and pressing the
spacebar or "+" on a marked file will unmark it. The F1 key
will call up 4DOS HELP from inside SELECT.
SELECT now has an "include list" format, e.g. SELECT COPY
(*.WKS+*.DAT) A: to display all specified files in one list.
--> The SELECT header has been redesigned. The full command is
now displayed on the second line (if you have more than about
64 characters in the command the display will be truncated).
The header also shows the length of the command line; this is
especially useful when using SELECT with [] as it is easy to
get the command line too long for external commands (126-
character limit) or internal commands (255 characters).
It is now possible to use SELECT with only one parameter,
e.g. SELECT (*.BAT) to choose a batch file to run.
The system should no longer hang if the SELECT command line
gets too long.
3.01 SELECT: Fixed a bug that was causing SELECT COPY to copy from
the wrong directory when the argument was a directory name with
no trailing backslash.
SET has two new switches: /P(ause) pauses after each page of
display; "/R filename" reads the environment variables from a
file (similar to ALIAS /R).
4DOS 3.01 [5-22-90] UPDATE30.DOC page 22
3.01 SET: SET /R can now read multiple files, for example:
set /r env1 env2 env3
SETDOS: There are four new switches:
/A(NSI) forces 4DOS to assume ANSI.SYS is installed.
/I(nternal) disables or re-enables a 4DOS internal command.
/L(ine input) forces 4DOS to read input one line at a time,
instead of the usual one character at a time. This may be
necessary for compatibility with some programs; see
COMPAT.DOC for details.
/U(pper) forces 4DOS to display all filenames in upper case.
3.01 SETDOS: There are two changes:
/S now resets the cursor shape immediately, so it can be used
to hide the cursor while in a batch file.
/U1 should now properly return uppercase filenames in all
instances.
SWAPPING: This is a new command which turns swapping ON or OFF.
See the manual for details.
TIME: Now supports the COMMAND.COM "AM / PM" syntax as well as
24-hour time syntax. Also a bug was fixed which caused the hun-
dredths of a second to be set to random values.
UNSET: This new command removes environment variables (like
UNALIAS does for aliases). See the manual for details.
4DOS 3.01 [5-22-90] UPDATE30.DOC page 23