[net.micro.pc] DOS 2.0 tidbits

jcw@cvl.UUCP (Jay C. Weber) (08/22/83)

Here are a few items that DOS 2.0 users should be interested in,
some are bad and some are good.

1) The DOS 1.1 system calls for reading from and writing to the
   console were changed in 2.0 to be reading from stdin and writing to
   stdout. This is nice in that DOS 1.1 programs can have their i/o
   redirected, but there are some problems.  When writing to stdout
   all tabs are expanded; I found this out when trying to get my
   "unexpand" program to work with writing to stdout. Also, the system
   calls to read are of two types; echo character read and no echo
   character read.  The problem is, a user program doesn't know
   which to do -- if you are typing it should be echo, redirected from
   a file it should be noecho.  In addition, I have had some programs
   that don't see EOF on redirected input, hanging and not being
   CTRL-BREAKable.

2) 2.0 interprets [<>|] as file redirection characters, but if you
   enclose them in double quotes (") they are sent to the program
   literally (so are the quotes). Single quotes do not do the same
   thing.  As far as I can tell, there is no way to escape the quotes.

3) In interactive command mode, the % sign has no special function.
   In batch mode, it is used for argument substitution.  However, when
   the following character is not a digit in batch mode this is what
   it does:
             echo %t        ==>   t
	     echo %%t       ==>   %t
	     echo %%%t      ==>   %t
	     echo "%t"      ==>   "t"

                                  2.0 ain't UN*X but better than CP/M,
				       Jay Weber
{..!seismo!rlgvax!cvl!jcw} and soon to be
{..!seismo!rochester!????}