Re: [hatari-devel] Printing Directly to a Printer

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On 25 Oct 2020 at 13:01, Marshall Lake wrote:

>
> >>>>      char buf[77];
> >>>>      FILE *lpr;
> >>>>
> >>>>      lpr = popen ("lpr", "w");
> >>>>      fprintf (lpr, "%s", buf);
> >>>>      pclose (lpr);
>
> >>> That certainly requires FreeMiNT and depends on your setup of your "lpr"
> >>> program.
>
> >> I also do not have much knowledge of the various Linux distros.  But ...
>
> > Just to make sure there's no confusion...
> >
> > Hatari is not a Linux distribution, or operating system. It's an
> > emulator for old Atari hardware.
>
>
> Ok.  I guess I don't understand the emulator paradigm and it's
> relationship to what it runs on.  (I run "Hatari under Linux" ... if I
> understand the language/concept properly.)
>
Let me try to clarify things.  An emulator in this context imitates a
particular computer hardware.  In this case, Hatari emulates Atari 16-bit
hardware, including the CPU (some 68K variant) and the add-on chips.

The standard operating system on this hardware is some form of Atari TOS (or
EmuTOS :-)).  So when Hatari starts up, it starts up TOS/EmuTOS which then
(normally) boots to the desktop from which you run user programs.

When a user program runs on Hatari, it can only use the functions provided by
the operating system that it's aware of, which in this case is TOS/EmuTOS.
Neither TOS nor support pipes, for many reasons.  It is possible to run a more
advanced operating system (FreeMiNT) on these systems, which does support
pipes.

When FreeMiNT is running, what you are requesting may be possible, depending
exactly how things are set up in you user program, Hatari, and Linux.  But
unless you use FreeMiNT, you will not be able to do what you are trying to do
in the way that you are trying to do it.

To print from a TOS user program to a Linux device, the easiest way would be
for the TOS program to print to PRN:, and then under Hatari you can route the
output from Hatari either to a file or to lpr.

Hope this helps.

Roger




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/