Hi!

> Is there also some documentation about the DOS part available?

You mean DOS port.

> What is the equivalent for /dev/mem or /dev/hda under DOS?

Not available. Linux users love "dd" because they use it
with all the /dev/something device driver files of their
big kernel, but in DOS, dd cannot be used for similar low
level stuff. In all operating systems, dd is still a fun
tool to copy and paste parts of all sorts of files... ;-)

Only a few selected /dev items are supported in DJGPP, by
handling them directly in the C library. DD for DOS can use:

/dev/stdin /dev/stdout /dev/stderr /dev/null (what else?)

Maybe also: /dev/tty /dev/fd/HANDLENUMBER /dev/tmpfile ??

Mentioned on www.delorie.com/djgpp/doc/kb/kb_10.html
"Transparent handling of special file names" are also:

- you can say /dev/c/dos/something to say c:\dos\something
  (good for programs which do not understand drive letters)

- you can say /dev/env/MYDIR/something to say %MYDIR%\something
  (expands environment variables)

- you can use /dev/ANYDOSCHARDRIVER, for example there is
  a driver which creates (u) r a n d o m $ DOS devices which,
  as usual in DOS, are visible in every existing directory,
  but DJGPP also makes them visible in the virtual /dev dir.
  See: www.rahul.net/dkaufman/ Note: CYGWIN has /dev/random

- DOS char drivers are: NUL CON PRN AUX LPT1 ... LPT3 COM1 ...
  COM4 and CLOCK$ but the latter is only useable via IOCTLs.
  Same for EMM386 and CDROM drivers etc, generally speaking.

Apart from the above, to answer your /dev/mem and /dev/hda
question: Well, you simply access the memory in DOS :-). As
for the disk, you use the BIOS in DOS. If you want to access
memory beyond the first 1 MB, use a 32bit compiler as DJGPP
or use int 15 function 87 if you have to use 16bit compilers.

As you see, /dev/FANCYSTUFF is not scriptable in DOS, but it
is still accessible ;-). By the way: There are of course not
only command.com and 4dos but there are also BASH etc in DOS.
Even fancy languages like PERL or REXX are available for DOS.

>>> Is there a port of dd for DOS?
>> www.ibiblio.org/pub/micro/pc-stuff/freedos/gnuish/gnufut21.zip
>> GNU file utils, with "dd.exe". Source included.

Cool, but 8.3 filenames on webservers are super annoying...
No altavista or google can know that gnufut is fileutils ;-)

Eric



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to