home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / msdos / programm / 11356 < prev    next >
Encoding:
Internet Message Format  |  1992-12-12  |  2.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!unixhub!ditka!ntg!netcomsv!cruzio!aki
  2. From: aki@cruzio.santa-cruz.ca.us
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: Background printing (IRQ7?)
  5. Keywords: IRQ7 background print
  6. Message-ID: <4742@cruzio.santa-cruz.ca.us>
  7. Date: Tue, 08 Dec 92 10:24:59 PST
  8. References: <1992Dec8.035415.26358@grebyn.com>
  9. Sender: aki@cruzio.santa-cruz.ca.us
  10. Reply-To: aki@cruzio.santa-cruz.ca.us
  11. Lines: 30
  12.  
  13. In article <1992Dec8.035415.26358@grebyn.com>, malak@grebyn.com (Michael Malak) writes:
  14. > What is the best way to achieve background printing in a DOS program, to
  15. > the level that Word Perfect achieves it?  Is it using IRQ7?  I've tried
  16. > guessing at how to use IRQ7 with no luck.  As far as I know I'm enabling
  17. > the 8259 _and_ the interrupt enable bit at the LPT1 port address, but I
  18. > don't get an interrupt when I send a character to the printer via INT
  19. > 17H.  Any suggestions?  Any example source?
  20.  
  21.  
  22. I don't know how many times this needs to be explained... maybe
  23. this should be thrown into the FAQ:  Never ever ever ever mix
  24. code that directly touches add-on chips AND also calls related
  25. BIOS functions.  BIOS makes too many assumptions.  Don't trust
  26. BIOS to do what you would like it to do.  If you take the time
  27. to talk directly to hardware, then don't cut a 5 minute corner
  28. by calling BIOS and ending up with an erroneous program.  The
  29. only cool BIOS tricks are to use it to switch to some operational
  30. mode and back (say video mode 13H, or setting all basic serial
  31. parameters). Other than that, use either _only_ BIOS or _only_
  32. direct programming.
  33.  
  34. Now Michael, in your case the problem is simple. INT 17H on most BIOS's
  35. simply rewrites the command-byte to send the line signals to the
  36. printer, thus it also disables the IRQ of the port. The only way out
  37. is to design your own character output routine and not use INT 17H.
  38.  
  39. Aki.
  40. -- 
  41. /  Phone: 408-662 9664   Fax: 662 9676  |  586 is a 586 no matter what  \ 
  42. \  125 Searidge Ct #D, Aptos, CA 95003  |  Intel seez.  "Pent... WHAT?" /
  43.