Announcement

Collapse
No announcement yet.

Another printing question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Another printing question

    Is there any way to catch the output sent to LPT1
    (from a dos program) using a TSR in powerbasic? Is this even
    possible. Those who know me probabaly know why I want to, but
    bascially I need to redirect output to a file when a printer is
    not available.

    ------------------
    Jonathan Simpson
    Jonathan Simpson

  • #2
    As long as the DOS app prints via an interrupt (and not by performing direct port I/O), it can generally be done with a ISR (interrupt service routine). While you can write the ISR install and uninstall code with PowerBASIC, you cannot write the actual ISR code in a high-level language that uses run-time functions. Instead, the ISR routine itself must be written in raw assembly code.

    However, instead of reinventing the wheel, search the net for "PRN2FILE" and try using that utility. Note that PRN2LPT is over 10 years old, and may or may not work under all versions of Windows. You'll have to try it and see if it will work for you.

    Last time I looked, it was freely available on the SimTel web site.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      i have a few programs not written by myself you maybe interested in
      also it seems that one program runs ok but only on slower processors
      send your email to redbonei AT excite WITH A DOT com and i will send some to you
      they are all freeware and run under msdos622
      paul

      ------------------


      [This message has been edited by paul d purvis (edited March 01, 2007).]
      p purvis

      Comment


      • #4
        Well, on the upside, it doesn't really need to work in windows... I already have a program for that.

        ------------------
        Jonathan Simpson
        Jonathan Simpson

        Comment

        Working...
        X