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