0 votes
by Andrew Read (150 points)

I have VFX Forth running in Windows terminal (see VFXFORTH -console - Q&A).  Stephen commented "The primary VFX kernel (vfxkern.exe) is also a console app but has only a minimal set of tools"

I would like to rebuild in the command line history feature in the console app.  Thus I can continue to use that feature when running VFX Forth in Windows Terminal.  That is, saving the input line to a history (ENTER) and retrieving the input line from a buffer (UP). 

May I ask for some pointers as to how I might work to achieve this?  I suppose I need to find a hook into "ENTER" and "UP" in the outer interpreter, or maybe there is a better way of thinking about this.

1 Answer

0 votes
by Stephen Pelc (4.3k points)
The console is a GENIO device. There may be several devices for a version of VFX and the console is being redesigned for v6.

The history system is contained within a GENIO device.

For Windows, see VFXBase/Win64/richedit.fth. For Linux, see Lib/Lin64/Genio/xterm.fth. For MacOS, see Lib/Osx64/Genio/xterm.fth.

For Windows, you will have to move or replicate the history system into the default console.
...