help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I/O Port Access


From: Gary Highberger
Subject: Re: I/O Port Access
Date: Sun, 17 Jan 2021 14:30:15 -0500

Hello David,

I'm not sure, in detail, what I'm going to do, but you've given me enough
to develop a broad outline. Many thanks!

My conclusions:

• GNU - Smalltalk isn't the place for low-level bit tinkering. It's
possible to do, but it sort of breaks the language.

• For now the plan is to handle the printer port in a C function, which
provides a text interface of some kind to GNU Smalltalk.

I'm developing a real-time control program written in GNU Smalltalk; and
yes, I'm totally worried about garbage collection.

The printer port isn't used to drive a printer at all. It's used (with
signal conditioning, etc.) to monitor and actuate real world devices. Email
me directly for more discussion on this.

Thanks for the help,

Gary



On Sun, Jan 17, 2021, 7:18 AM stes@PANDORA.BE <stes@telenet.be> wrote:

>
> I'm under the impression that when you write "Smalltalk" you mean "GNU
> Smalltalk".
>
> As the wikipage https://en.wikipedia.org/wiki/GNU_Smalltalk explains:
>
> "unlike other Smalltalk environments, uses text files for program input
> and interprets the contents as Smalltalk code. In this way, GNU Smalltalk
> acts more like an interpreter rather than an environment in the traditional
> Smalltalk manner."
>
> There are some elements of a "language" in Smalltalk (the non
> GNU-Smalltalk products),
> but also some elements of an "operating system" or "environment" in
> Smalltalk.
>
> But as a simple start GNU Smalltalk you could "pipe" output of
> text-oriented Smalltalk programs,
> to "lp" or "lpr" (UNIX commands).
>
> I think that GNU Smalltalk also has some support for calling C functions
> from within Smalltalk.
>
> If you really want to do low-level C programming from within GNU
> Smalltalk, that is ALSO possible.
>
> And the reverse is also possible : calling Smalltalk from within C
> programs.
>
> However I wonder whether to start, a simple "pipe" to "lp" would it be
> sufficient,
> or can you explain in more detail what you are trying to do ?
>
> David Stes
>
> ----- Op 17 jan 2021 om 0:40 schreef Gary Highberger
> gary.highberger@gmail.com:
>
> > Hi everyone,
> >
> > Is there a way to access a port (a parallel printer port) with Smalltalk?
> >
> > In C I use ioperm (request permission), fcntl (open the port) and outb
> > (send a byte to the port), etc.
> >
> > Thank you,
> >
> > Gary
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]