home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12301 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.8 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!funic!sauna.cs.hut.fi!news.cs.hut.fi!inkari
  2. From: inkari@snakemail.hut.fi (Juha Inkari)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: The IN_DOS flag and writing to disk
  5. Date: 21 Jan 93 15:22:11 GMT
  6. Organization: Helsinki University of Technology, Finland
  7. Lines: 34
  8. Distribution: comp
  9. Message-ID: <INKARI.93Jan21172213@lk-hp-1.hut.fi>
  10. NNTP-Posting-Host: lk-hp-1.hut.fi
  11.  
  12.  
  13. I need advice in how to:
  14.  
  15. a) Properly interpret the IN_DOS flag under Dos 5.00.
  16.  
  17. b) Write to disk file from background interrupt. 
  18.  
  19. This is because I am making an application that will monitor a serial
  20. port and save the data to a disk file.
  21.  
  22. I have the serial interrupt cude written, which will put incoming
  23. characters in receive queue.  Then an interrupt handler which is
  24. chained to the clock tick interrupt will read the receive queue and
  25. process the data and possible put something in the send queue. Also
  26. characters read from the receive code are put in the disk buffer (1k).
  27. This seem to work ok.
  28.  
  29. There is yet another interrupt chained in the MS-DOS background
  30. interrupt (0x28). This handler will do the writing to the disk file.
  31. It checks for IN_DOS flag and if BIOS disk interrupt is executing (I
  32. have a handler which will trap the BIOS interrupt and set a flag) and
  33. if there is more than 512 characters in the disk buffer and if all is
  34. ok we will open a disk file and write 512 bytes and close the disk
  35. file.
  36.  
  37. Unfortunately, this isn't working. I am unable to open the file, and
  38. if it has been opened before, unable to write to it.
  39.  
  40. Also the IN_DOS flag (I use Dos function 0x34 to get the flag location
  41. returned in registers ES:BX) seems only to be zero when I have an application
  42. running (like Borlang C++ IDE) and not when COMMAND.COM is running.
  43.  
  44. --
  45. /* Juha.Inkari@hut.fi */
  46.