• FigForth v1.4 for the PDP-11 with fix for modern systems

    From ECNeilson@eric@neilsonhart.com to comp.lang.forth on Thu Sep 3 16:22:44 2026
    From Newsgroup: comp.lang.forth

    I run RSX-11M on a PiDP emulator and recently installed FIG-FORTH to experiment with programming Forth in a PDP-11 environment. I found an
    issue that effects modern systems trying to interpret some of the text
    output from FIG-FORTH.

    FIG-FORTH's dictionary intentionally sets the high bit on each word's
    last name-character as an "end of name" marker, assuming a 7-bit-only
    terminal simply won't display that bit. The problem is modern terminal emulators will treat that last byte as an invalid character and render
    it as a "?". You see this "?" only in odd-numbered words, not even.
    It's really annoying if you're trying to decipher a 1-word character.

    For example, if you do a VLIST, you see something like this:
    NF? CF? LF? LATEST TRAVERSE -DUP SPAC? RO? ? ?
    ? ? ? ALLO? HERE 2+ 1+ PREV US? HL? R# CS?

    This issue looks to boil down to ID, so I made a three-line patch to
    FORTH.MAC which strips that high bit from it's own scratch copy of the
    name in PAD right before printing, so now you see this with a VLIST:

    NFA CFA LFA LATEST TRAVERSE -DUP SPACE ROT > <
    = - , ALLOT HERE 2+ 1+ PREV USE HLD R# CSP

    I didn't touch any of the real dictionary entries, and so far the patch
    does not appear to have broken anything.

    Stackosaurus seems to be the current maintainer of FIG-FORTH, but their website http://www.stackosaurus.com/figforth.html doesn't look to have
    any way to contact them, so I'm posting my fix here.

    I hope this helps someone else and here is another before/after example

    Before the Patch:

    run forth
    FIG-FORTH V 1.3
    1 load

    LOADING EDITOR... ? ISN'T UNIQUE ? ISN'T UNIQUE
    LOADING ASSEMBLER... R0 ISN'T UNIQUE ? ISN'T UNIQUE
    LOADING STRING PACKAGE...
    LOADING STRING EXTENSIONS...
    BY? ISN'T UNIQUE
    OK

    After the Patch:
    run forth
    FIG-FORTH V 1.4
    1 load

    LOADING EDITOR... R ISN'T UNIQUE I ISN'T UNIQUE
    LOADING ASSEMBLER... R0 ISN'T UNIQUE # ISN'T UNIQUE
    LOADING STRING PACKAGE...
    LOADING STRING EXTENSIONS...
    BYE ISN'T UNIQUE
    OK

    Eternal September won't let me post attachments (even text attachments),
    so here is the patch diff for FORTH.MAC which you can download directly
    from here: http://www.stackosaurus.com/figforth.html

    --- FORTH.MAC (v1.3, original)
    +++ FORTH.MAC (v1.4, patched)
    @@ -1406,7 +1406,14 @@
    HEAD 203,ID.,256,IDDOT,DOCOL ; ***** ID.
    .WORD PAD,LIT,40,LIT,137,FILL,DUP
    .WORD PFA,LFA,OVER,SUB,PAD,SWAP,CMOVE
    - .WORD PAD,COUNT,LIT,37,AND,TYPE,SPACE,SEMIS
    + .WORD PAD,COUNT,LIT,37,AND
    +; MASK OFF THE HIGH BIT (END-OF-NAME MARKER) ON THE LAST CHARACTER OF
    +; THE LOCAL PAD COPY ONLY, SO IT DISPLAYS CORRECTLY ON A 7-BIT TERMINAL.
    +; THE REAL DICTIONARY ENTRY IS NEVER TOUCHED (FIND STILL NEEDS ITS
    +; MARKER BIT INTACT), ONLY THIS SCRATCH COPY IN PAD.
    + .WORD DUP,TOR,OVER,PLUS,LIT,1,SUB
    + .WORD DUP,CAT,LIT,177,AND,SWAP,CSTOR
    + .WORD FROMR,TYPE,SPACE,SEMIS
    ;
    HEAD 206,CREATE,240,CREAT,DOCOL ; ***** CREATE
    .WORD DFIND,ZBRAN,XXD2-.,DROP,NFA,IDDOT
    @@ -1482,7 +1489,7 @@
    .WORD SPSTO,DEC,SPACE
    .WORD CR,PDOTQ
    .BYTE 21
    - .ASCII /FIG-FORTH V 1.3 /
    + .ASCII /FIG-FORTH V 1.4 /
    .EVEN
    .WORD FORTH,DEFIN,QUIT
    ;

    Enjoy,
    ECNeilson




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From David Meyer@papa@sdf.org to comp.lang.forth on Sat Sep 5 13:08:03 2026
    From Newsgroup: comp.lang.forth

    I encountered the same problem with VAX fig-Forth. I fixed it with Forth
    code.


    SYS$COMMON:[CONTRIB.FORTH]30001.FIG;1

    ( VAX fig-Forth VLIST fix 1/2 )
    ( 16-APR-2025 David Meyer <papa@sdf.org> +JMJ )
    ( VLIST prints word names with 128 added to the char. code for )
    ( the last char. of each name. Fix by reimplementing ID. to )
    ( print correct code for last char. of word name. )
    ( VLIST reimplentation is identical to assembly original )
    ( except for calling fixed ID. )
    : ID. ( nfa -- ) ( AND each char. code with 127 )
    (ID) 0 DO DUP I + C@ 127 AND EMIT LOOP DROP SPACE ;


    SYS$COMMON:[CONTRIB.FORTH]30002.FIG;1

    ( VAX fig-Forth VLIST fix 2/2 )
    ( 16-APR-2025 David Meyer <papa@sdf.org> +JMJ )
    : VLIST ( -- )
    CR 128 OUT ! CONTEXT @ @ BEGIN
    DUP (ID) SWAP DROP OUT @ + 76 > IF CR ENDIF
    DUP ID. SPACE SPACE PFA LFA @ DUP 0= ?TERMINAL OR
    UNTIL
    DROP CR ;
    --
    David Meyer
    Takarazuka, Japan
    papa@sdf.org
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From ECNeilson@eric@neilsonhart.com to comp.lang.forth on Sat Sep 5 21:16:18 2026
    From Newsgroup: comp.lang.forth

    On 9/4/26 11:08 PM, David Meyer wrote:
    I encountered the same problem with VAX fig-Forth. I fixed it with Forth code.

    Ok, that is clever. I don't seem to have ID defined in my PDP-11
    FIG-Forth, unfortunately.

    ECNeilson


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From legalize+jeeves@legalize+jeeves@mail.xmission.com (Richard) to comp.lang.forth on Thu Sep 17 17:25:24 2026
    From Newsgroup: comp.lang.forth

    ECNeilson <eric@neilsonhart.com> spake the secret code <117cof5$tinj$1@dont-email.me> thusly:

    I hope this helps someone else and here is another before/after example

    It is a useful correction/addition and I would recommend that you make
    a git repository on github with the original version and your patch as
    separate commits. Things are *much* easier to find when they are on
    github instead of as source archives on various web sites.

    My 0.2mg Au
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Fri Sep 18 11:23:25 2026
    From Newsgroup: comp.lang.forth

    In article <118h7q4$3icrv$2@news.xmission.com>, Richard <> wrote:
    ECNeilson <eric@neilsonhart.com> spake the secret code ><117cof5$tinj$1@dont-email.me> thusly:

    I hope this helps someone else and here is another before/after example

    It is a useful correction/addition and I would recommend that you make
    a git repository on github with the original version and your patch as >separate commits. Things are *much* easier to find when they are on
    github instead of as source archives on various web sites.

    My 0.2mg Au

    This is not FIG Forth filosofy. FIG distributed source listings.
    The FIG sources are cast in stone, just as well.
    You are supposed to adapt the source to your needs.
    In other worths, they are flying in a million directions.

    Trivial modification are not worth a website.

    --

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From legalize+jeeves@legalize+jeeves@mail.xmission.com (Richard) to comp.lang.forth on Fri Sep 18 14:12:13 2026
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl spake the secret code <nnd$4dad865c$0146e63a@3e36f6f7a037eed8> thusly:

    In article <118h7q4$3icrv$2@news.xmission.com>, Richard <> wrote:
    ECNeilson <eric@neilsonhart.com> spake the secret code >><117cof5$tinj$1@dont-email.me> thusly:

    I hope this helps someone else and here is another before/after example

    It is a useful correction/addition and I would recommend that you make
    a git repository on github with the original version and your patch as >>separate commits. Things are *much* easier to find when they are on
    github instead of as source archives on various web sites.

    My 0.2mg Au

    This is not FIG Forth filosofy. FIG distributed source listings.

    Just what do you think version control is, if not source listings?

    The FIG sources are cast in stone, just as well.
    You are supposed to adapt the source to your needs.

    Are they cast in stone or are you supposed to modify them? You seem
    to contradict yourself within 2 sentences.

    Trivial modification are not worth a website.

    Are you actually saying you don't know what github is?
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From ECNeilson@eric@neilsonhart.com to comp.lang.forth on Mon Sep 28 21:36:02 2026
    From Newsgroup: comp.lang.forth

    On 9/17/26 12:25 PM, Richard wrote:
    It is a useful correction/addition and I would recommend that you make
    a git repository on github with the original version and your patch as separate commits. Things are *much* easier to find when they are on
    github instead of as source archives on various web sites.
    I'll do this. I have a couple of Git repos already, so I'll create a
    PDP-11 Project repo.

    I recently fixed a 40-year old bug in FOCAL that deserves a PDP repo
    post as well. Funny story on that: I had installed FOCAL into my
    PiDP-11 emulator and randomly picked a program from an old FOCAL
    programming book to enter as a test. That program just happened to use
    an exponent function in FOCAL that had a recursion bug that blew the
    FOCAL stack. All the other FOCAL math functions had proper bounds
    checking. That was a fun project.

    Eric N.
    --- Synchronet 3.22a-Linux NewsLink 1.2