Re: xx-DOS (im)possible problem!
Alain <[email protected]> Tue, 12 Nov 2002 19:17:48 -0200
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Eric, The real problem is with Clipper programs that use the isprinter() command. I had information on it's source and it calls int 17 with ah=02 and tests if the returned value is 90h. I cannot change the programs: I only have to make them work :( I made a small C test program. and tested it in many ways: - local printer: ok - no printer: ok (returns 90h but I have experience that this he dependent - dos-box in win98: ok (local printer, no printer and network printer) As to the ack pin: yes it is a 10us pulse and normaly stays high and is read as 0 by the bios. ( I made printers, that side I know) The big questions are: 1) how does it work with ms-dos 7.10 and not ms-dos 6.22/Freedos? 2) would it be ok it I just turn that bit off with a tsr? thanks for any help, anyone, Alain > Hi, INT 0x17 is indeed NOT normally handled by DOS. However, > as you use network printing, the network driver probably tries > to redirect it. But it would be better to use the PRN or LPT1 > device instead of INT 0x17 to access network-redirected printers. > > It is possible that the MS-Client driver does not at all modify > INT 0x17 and what you get is the status of the local printer port > instead (try to connect a printer, put the local printer in online/ > offline/error states...). Windows DOES modify INT 0x17 in the DOS box > because it wants to capture DOS printing data and redirect it to the > Windows queue, to avoid that DOS programs mess with the printer > directly (AFAIK). > > INT 17 - PRINTER - GET STATUS > AH = 02h > DX = printer number (00h-02h) > Return: AH = printer status (see #00631) > > Bitfields for printer status: > Bit(s) Description (Table 00631) > 7 not busy > 6 acknowledge > 5 out of paper > 4 selected > 3 I/O error > 2-1 unused > 0 timeout > Notes: If both, bit 5 "out of paper" and 4 "selected" are set, the MS-DOS/ > PC DOS kernel assumes that no printer is attached. > > ACK is - I think - only a bit that flashes for a moment when the printer > tells you that it successfully received the data. With no printer attached, > it is probably stuck to a different value than the idle state of an attached > printer would be. While the timeout bit comes from the BIOS, most other bits > are just what you see at some I/O port, partially inverted by the BIOS. > > Eric