Re: cross-platform serial api for gforth
- From: rickman <gnuarm@xxxxxxxxx>
- Date: Fri, 2 Jan 2009 12:25:24 -0800 (PST)
On Jan 2, 11:56 am, Bernd Paysan <bernd.pay...@xxxxxx> wrote:
Anton Ertl wrote:
Joel Reymont <joe...@xxxxxxxxx> writes:
Is there cross-platform code for gforth that would let me talk to the
serial port on Unix and Windows?
Not that I know of. There have been several people who did serial
stuff for Gforth over the years, so I guess there would be demand for
that (if someone wants to contribute something in this direction).
There's some code in arch/r8c/terminal.fs, works on Linux and Windows, and
uses the old libffi/ffcall interface.
Maybe someone can explain some of this to me. I am working with Joel
on a project but it is sort of like when someone says, "We went to
different high schools together". He is a software person using a Mac
and is Linux literate while I am a hardware engineer and Winblows
user.
The project we are working on is an interactive display for a device
on an RS-232 serial port. My concept is based on what I have seen in
Win32Forth. I found some sample code in a file called winser.f that
opens, inits and closes a serial port using read-file, write-file and
CreateFile. The next level in the code are the words, ComOpen,
ComSetup, ComClose, Com1key?, Com1key and Com1emit.
My thinking is that as long as there is code in the Forth being used
that provides sufficient routines to write the above COM functions,
this will support the app program. Joel and I have discussed this a
bit and I think our different backgrounds is making it hard for us to
understand each other. The several thousand mile separation isn't
helping any either. Email and forums posts are not the best way to
communicate this sort of thing.
The question is, what do we need to use different Forths on different
platforms to develop a app that uses a serial port and works on both
platforms? We also have a similar issue with managing the screen. I
will be happy using a terminal emulation type display using ANSI
terminal sequences. I do want to have fields on the display that are
updated and edited, a bit like a debugger display showing the CPU
registers. But for the initial work a scrolling display is
sufficient.
A second question is do I need to use Win32Forth? Is there an easy
way for me to use Gforth on a Winblows machine? I don't think I want
to use a VM if I can avoid it. Remember I am a hardware guy and a bit
software phobic (too many years under Winblows).
Rick
.
- Follow-Ups:
- Re: cross-platform serial api for gforth
- From: Anton Ertl
- Re: cross-platform serial api for gforth
- From: Helmar
- Re: cross-platform serial api for gforth
- References:
- cross-platform serial api for gforth
- From: Joel Reymont
- Re: cross-platform serial api for gforth
- From: Anton Ertl
- Re: cross-platform serial api for gforth
- From: Bernd Paysan
- cross-platform serial api for gforth
- Prev by Date: Re: gforth 3d demo
- Next by Date: Re: cross-platform serial api for gforth
- Previous by thread: Re: cross-platform serial api for gforth
- Next by thread: Re: cross-platform serial api for gforth
- Index(es):
Relevant Pages
|
Loading