Ralf Reköndt wrote:
> Oh folks, don't know how this guy makes it all. What should I say....Marcel
> "The Wizzard" Kilgus has done it again!

Well, I somewhat like reverse engineering old code, I really should
find a job where I get paid for this kind of stuff ;-)

Finding the right piece of code was actually very difficult in this
case, because the only outside effect is the printed FF. I did try
various heuristic searches for an hour and came pretty close, but
didn't realize that back then.

Then I read that the printer driver can also specify the baud rate of
a serial port. Now, any routine that sets the baud rate I can find
within a few seconds, because it must be a standard OS call! Using
that as a starting point I was able to back-trace the data flow to the
original xchange_dat in memory and, knowing where the lines-per-page
location within that file is, forward trace the flow again to the
routine that checks the line number and does the FF sending.

Sometimes it pays off to think a bit outside the box. Though I could
have thought of it a lot sooner and saved myself some time ;-)

Next problem was where to put the additional code I had to include for
the test for 0. The end of the file was too far away for normal jumps.
It's still doable to put it there, but it needs a bit more effort.
Anyway, there my "menu lines patch" came to the rescue, because my
"compatible with all modes" code is actually several hundred bytes
shorter than the original one, leaving more space for the patch than
it could ever need.

Ah well, I thought some people might wonder how these things are done,
hope nobody got bored to death.

> After printing with QPCprint, nothing happens. This, because Archive lets
> the printer port open after the first "lprint" command.

Just a wild guess, but looking through the commands that are available
there I see "spoolon"/"spooloff". Perhaps they can be used somehow, I
don't know.

Marcel

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to