[net.micro.pc] Device Names in MS-DOS

p40001@mcomp.UUCP (09/23/86)

==
Repeatedly during the past few months I have come across C source
specifically for MS-DOS systems, which used names such as
"/dev/con" for the console device, most recently in the latest
issue of DDJ (Oct 1986), in Alan Holub's listing of a "more"
program for MS-DOS.

I am aware that under UNIX, devices appear as files in the directory
/dev, but was unaware of a similar construct under MS-DOS.

Is this notation an undocumented feature of DOS, or a feature of
a particular C compiler, or is it simply an error?

An unrelated question:

Can anyone point me to a source of data cassettes for the Everex
Stream-20 tape drive? These are not your usual data cartridges, 
but look like normal Compact Cassettes, with a 1/4 inch notch
slightly off-center in the rear edge. They hold about 20MB of data,
and I know they are available from PC Network for about $30; however,
I would like both a cheaper and if possible faster source than 
PC Network.
-----------------------------------------------------
Wolf N. Paul, 290 Dogwood, Plano, Tx. 75075
UUCP:  ihnp4!convex!mcomp!doulos!wnp
  or   ihnp4!convex!mcomp!p40001
Phone: (214) 578-8023  W.U.ESL: 6283-2882

dan@prairie.UUCP (Daniel M. Frank) (09/28/86)

In article <10800015@mcomp> p40001@mcomp.UUCP writes:
>Repeatedly during the past few months I have come across C source
>specifically for MS-DOS systems, which used names such as
>"/dev/con" for the console device ...
>Is this notation an undocumented feature of DOS, or a feature of
>a particular C compiler, or is it simply an error?

   It's an undocumented feature of DOS.  You can use the /dev/ pathname
notation anywhere you would normally use the device name.
-- 
--------

    Dan Frank

    uucp: ... uwvax!prairie!dan
    arpa: dan%caseus@spool.wisc.edu

plocher@puff.wisc.edu (John Plocher) (09/28/86)

[fodder]

In reply to the notation behind /dev/con as used under MS-DOS:

 DOS parses the filename into three parts:
     PATH \ FILENAME . TYPE
If FILENAME is a known device (CON, COM1, PRN, NUL...) then
the file request goes directly to that device driver.
Thus MASM... use the filename NUL.LST etc to denote
the bit bucket.  
 In this light, the /dev is completely ignored, in fact
you *could* use /foo/bar/foobar/nul.tmp as another name for the
bit-bucket.

 There is an undoccumented DOS call (at least in 2.1) which
makes device names completely significant (path\filename.type)
but I don't know of ANYONE who uses it.


-- 
		harvard-\         /- uwmacc!uwhsms!plocher        (work)
John Plocher     seismo-->!uwvax!<
		  topaz-/         \- puff!plocher                 (school)


"Never trust an idea you get sitting down" - Nietzche