Re: cross-platform serial api for gforth



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
.



Relevant Pages

  • Re: Create Demo Application for Emaulator
    ... generate emulator images for our devices. ... two-line character LCD, no graphical display. ... You can emulate the serial port I/O using the hosting PC's serial port in ... because desktop PC's use drive letters, C:, D:, etc. while Windows CE does ...
    (microsoft.public.windowsce.app.development)
  • Re: cross-platform serial api for gforth
    ... serial port on Unix and Windows? ... and is Linux literate while I am a hardware engineer and Winblows ... The project we are working on is an interactive display for a device ... way for me to use Gforth on a Winblows machine? ...
    (comp.lang.forth)
  • Re: serialPort receive problem
    ... That would be expected, as the serial port data could not have been transmitted, and a response received, in the time that you have allowed between the Write command and the ReadExisting call. ... Every thing works fine except whenever I receive data I cannot display ...
    (microsoft.public.dotnet.languages.vb)
  • Re: cross-platform serial api for gforth
    ... serial port on Unix and Windows? ... Gforth mailing list). ... M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html ...
    (comp.lang.forth)
  • Re: Worker thread in VC++ 6
    ... LRESULT OnUpdateStatus(WPARAM wParam, LPARAM lParam); ... It is just there to test if data from serial port is read corectly. ... Once you send it to a message that is handled by your UI thread then you can do just about anything with the data (display, log to file, accumulate, etc.) ...
    (microsoft.public.vc.mfc)