Thread: DOS Reference Material

  1. #1
    Adamant Programmer Axpen's Avatar
    Join Date
    Jun 2003
    Location
    USA
    Posts
    42

    DOS Reference Material

    Yo Yo, what's up yah?

    I have a question, is there anywhere you can get good C related DOS references, all stupid MSDN has is WIN32 API.

    I can deal with x86 Assembly so if that's the only good reference place that's fine, I prefer it be in C though. It's just overwhelming how little technical DOS reference there is available, and how difficult microsoft is to get ahold of!!!

    Well anyways, any good ADVANCED DOS programming references in C would be GREAT! In particular want to use pipes and NOT THROUGH WIN32 API! nor POSIX.

    Thanks for the help err'body,
    Alex
    The Man With 3 Ears::Oh no better get the huskers

    Download Helppc by David Jurgens, It's a FANTASTIC Reference!!!

    In Case I Forget I Have:
    Windows XP
    For My 32-bit Questions:
    Dev C++ (mainly just use its mingw)
    For My 16-bit Questions:
    Borland Turbo C++ 1.01

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Since DOS doesn't have pipes, what are you actually hoping to achieve?

    I hope you're not referring to that rectangular black box in 2K or XP as DOS, because it isn't.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    www.entropysink.com
    Join Date
    Feb 2002
    Posts
    603
    Visit entropysink.com - It's what your PC is made for!

  4. #4
    www.entropysink.com
    Join Date
    Feb 2002
    Posts
    603
    Quote Originally Posted by Salem
    Since DOS doesn't have pipes, what are you actually hoping to achieve?
    .....unless of course he's referring to the | symbol, where you pipe the output of one command to somewhere else?
    Visit entropysink.com - It's what your PC is made for!

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    A shallow imitation of pipes
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Adamant Programmer Axpen's Avatar
    Join Date
    Jun 2003
    Location
    USA
    Posts
    42
    Thank RobR for the reference.

    I know that the command interpreter is not REALLY DOS since all it does is act as a shell and especially since 2000 and XP are from the NT kernel which doesn't rely on DOS to run, as Win16 and Win 9x did.

    However DOS does have pipes such as
    Code:
    ECHO Hello | myprog.exe
    then it passes ECHO's output to myprog.exe's stdin. That would be the pipes to which I was refering. Why do you say they aren't good pipes!? What are pipes supposed to do besides provide a link between to programs?? I'll assume you're comparing the pipes in which I speak of to the POSIX ones.

    Anyways thanks everyone, I could use all the reference material yall can scrounge up ^_^,
    Alex
    The Man With 3 Ears::Oh no better get the huskers

    Download Helppc by David Jurgens, It's a FANTASTIC Reference!!!

    In Case I Forget I Have:
    Windows XP
    For My 32-bit Questions:
    Dev C++ (mainly just use its mingw)
    For My 16-bit Questions:
    Borland Turbo C++ 1.01

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > Why do you say they aren't good pipes!?
    1. Because its done using temporary files - both programs do not run at the same time
    2. There is no way to do the same thing inside your programs, without using the shell to mangle it for you.
    Read about pipes on a real operating system and you'll see just how clunky DOS pipes are.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    you do realize that it has nothing to do with C since you're just doing something like this:

    system("ECHO This is pointless");
    PHP and XML
    Let's talk about SAX

  9. #9
    Adamant Programmer Axpen's Avatar
    Join Date
    Jun 2003
    Location
    USA
    Posts
    42
    Thanks alot for that information Salem, I didn't realize that temp files were used, shoot I could create a program that operates from temp files myself, how crappy!

    Well thanks for the replies everyone i'm looking forward to seeing more DOS references ^_^
    Alex
    The Man With 3 Ears::Oh no better get the huskers

    Download Helppc by David Jurgens, It's a FANTASTIC Reference!!!

    In Case I Forget I Have:
    Windows XP
    For My 32-bit Questions:
    Dev C++ (mainly just use its mingw)
    For My 16-bit Questions:
    Borland Turbo C++ 1.01

  10. #10
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I have the DOS 6.20 tech ref but it was not easy to find...nor is it particularly useful right now.

    You can do preemptive and cooperative multitasking in DOS....but you must write the multitask code. But DOS is not the best place to do this. You would probably want to switch to protected mode and DOS cannot run in protected mode. So to execute any DOS functions on int 21h you would need to either run them in virtual 8086 mode or real mode - which requires more processor cycles.

    You can do pipes through calls and cocalls in DOS but it aint pretty and you always have to deal with the re-entrant issue.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem creating .so
    By k0k33 in forum C Programming
    Replies: 7
    Last Post: 04-27-2009, 04:41 AM
  2. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  3. Constructive Feed Back (Java Program)
    By xddxogm3 in forum Tech Board
    Replies: 12
    Last Post: 10-10-2004, 03:41 AM
  4. Problem with OpenGL tutorial
    By 2Biaz in forum Windows Programming
    Replies: 18
    Last Post: 09-16-2004, 11:02 AM