home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8556 < prev    next >
Encoding:
Internet Message Format  |  1992-08-15  |  2.2 KB

  1. Path: sparky!uunet!olivea!sgigate!sgiblab!ultra!jimh
  2. From: jimh@ultra.com (Jim Hurley)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: DOS Help request - programming without video or keyboard.
  5. Message-ID: <1992Aug15.211852.3619@ultra.com>
  6. Date: 15 Aug 92 21:18:52 GMT
  7. Organization: Ultra Network Technologies
  8. Lines: 46
  9.  
  10. That subject line is a bit vague, let me expand. I am writing
  11. an application in an embedded DOS environment. The product will
  12. have no keyboard or video, I am just using DOS as a file-system,
  13. basically. I will have a small task-switching kernel and
  14. some extra hardware to attach to a special bus where I/O to the
  15. user will occur.
  16.  
  17. I'm haven't much experience in DOS programming, so I'm not sure
  18. about this part:
  19.  
  20. If I want one of my processes to, say, format the disk from
  21. a user command, how do I do that? The DOS call will output
  22. all the stuff about inserting the disk, format another?, etc.
  23. But I don't have a keyboard that the BIOS function can get to.
  24.  
  25. I suppose I will be using the Microsoft C 'system()' call to
  26. do the formatting. As I understand it, this will spawn a second
  27. Command.com environment, but the child task will not inherit
  28. the stdin and stdout of the parent.
  29.  
  30. The only way I can think of doing it is to write a device driver
  31. for all my I/O processes and issue a redirection to them.
  32.  
  33. For example, if I have a device called PORTIN: and PORTOUT:
  34. and install proper drivers, I can issue the format command
  35. like this:
  36.  
  37.     error = system("format a: /s < PORTIN: > PORTOUT:");
  38.  
  39. and my I/O devices will get the proper characters.
  40. I suppose I have to hook into the critical error interrupts,
  41. control-break stuff, etc., to avoid other problems.
  42.  
  43. Has anyone done anything like this? Other possibilities,
  44. gotchas, etc?
  45.  
  46. As I understand it, the device drivers get chained together.
  47. If I have 30 or 40 I/O device drivers installed, will there be
  48. any problems? Are there limits or significant real-time hits?
  49.  
  50. Any help at all will be greatly appreciated, I can study books to
  51. figure out how to do the stuff, I just want to get off in the
  52. right direction.
  53. -- 
  54. Jim Hurley --> jimh@ultra.com  ...!ames!ultra!jimh  (408) 922-0100
  55. Ultra Network Technologies / 101 Daggett Drive / San Jose CA 95134
  56.