🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.pc
Article #71796

Direct Port Printing Algorithm For PC's

#71796
From: Steve Ackroyd
Date: Sun, 12 Nov 1995 00:00
43 lines
2783 bytes
I have developed a DOS based software system, part of whose 
functionality is to send large (2Mb to 5Mb) print image files to a 
local parallel attached HP III compatible laser printer.  The software 
runs on a variety of PC's varying from 386SX-20 to 486DX2-66 and I have 
noticed that printing on the 386 machines is dramatically slower than 
on the 486 machines.  This was rather unexpected since even a 386 
should be able to pump data down a parallel port faster than the 
printer can receive it.

My printing routine is written in Borland C++, with the low level stuff 
in in-line assembler.  I am currently using the BIOS interrupt 
mechanism for outputting each character which I suspect might be the 
source of the problem.  It is possible, since the BIOS on 
the 486 PC's is cached whereas it is not on the 386 PC's, that this 
BIOS caching might have a significant effect on the servicing time for 
BIOS interrupts.

In order to prove, or disprove this theory, I would like to try 
sending data directly to the printer port thus bypassing the BIOS 
interrupt mechanisms.  Unfortunately I have not been able to find an 
algorithm which tells me exactly how to do this.  This is very low 
level stuff and involves the manipulation of the three printer 
control ports and the monitoring of the various printer hardware lines.

Does anybody out their have such an algorithm?  It doesn't matter 
whether it is in the form of pseudo code or just a description, so long 
as it is comprehensive enough for me to convert to assembler.

I've tried to find this subject matter in various technical bookshops, 
but the only mention of parallel port control that I have discovered is 
in the excellent "PC Intern" book.  Unfortunately a comprehensive 
algorithm is not provided.

If this is not the best news group for such a detailed technical 
question, then could someone please suggest a more suitable location.

Cheers,
Steve
-- 
=============================================================================
= Steve Ackroyd ==================================================== Yemble =
= steve@yemble.demon.co.uk ======================================= Software =
=============================================================================
Technical Details
Message-ID: <216688317wnr@yemble.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1036bc,e436decf81012211,start
X-Google-Attributes: gid1036bc,public
From: Steve Ackroyd <steve@yemble.demon.co.uk>
Subject: Direct Port Printing Algorithm For PC's
Date: 1995/11/12
Message-ID: <216688317wnr@yemble.demon.co.uk>
X-Deja-AN: 119211914
x-broken-date: Sunday, Nov 12, 1995 14.51.44
x-nntp-posting-host: yemble.demon.co.uk
organization: Yemble Software
reply-to: steve@yemble.demon.co.uk
newsgroups: demon.tech.pc