help-smalltalk
[Top][All Lists]
Advanced

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

Re: I/O Port Access


From: address@hidden
Subject: Re: I/O Port Access
Date: Sun, 17 Jan 2021 13:18:10 +0100 (CET)

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]