Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135544 > unrolled thread
| Started by | ECNeilson <eric@neilsonhart.com> |
|---|---|
| First post | 2026-09-03 16:22 -0500 |
| Last post | 2026-10-03 23:26 -0500 |
| Articles | 8 — 4 participants |
Back to article view | Back to comp.lang.forth
FigForth v1.4 for the PDP-11 with fix for modern systems ECNeilson <eric@neilsonhart.com> - 2026-09-03 16:22 -0500
Re: FigForth v1.4 for the PDP-11 with fix for modern systems David Meyer <papa@sdf.org> - 2026-09-05 13:08 +0900
Re: FigForth v1.4 for the PDP-11 with fix for modern systems ECNeilson <eric@neilsonhart.com> - 2026-09-05 21:16 -0500
Re: FigForth v1.4 for the PDP-11 with fix for modern systems legalize+jeeves@mail.xmission.com (Richard) - 2026-09-17 17:25 +0000
Re: FigForth v1.4 for the PDP-11 with fix for modern systems albert@spenarnc.xs4all.nl - 2026-09-18 11:23 +0200
Re: FigForth v1.4 for the PDP-11 with fix for modern systems legalize+jeeves@mail.xmission.com (Richard) - 2026-09-18 14:12 +0000
Re: FigForth v1.4 for the PDP-11 with fix for modern systems ECNeilson <eric@neilsonhart.com> - 2026-09-28 21:36 -0500
Re: FigForth v1.4 for the PDP-11 with fix for modern systems ECNeilson <eric@neilsonhart.com> - 2026-10-03 23:26 -0500
| From | ECNeilson <eric@neilsonhart.com> |
|---|---|
| Date | 2026-09-03 16:22 -0500 |
| Subject | FigForth v1.4 for the PDP-11 with fix for modern systems |
| Message-ID | <117cof5$tinj$1@dont-email.me> |
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
[toc] | [next] | [standalone]
| From | David Meyer <papa@sdf.org> |
|---|---|
| Date | 2026-09-05 13:08 +0900 |
| Message-ID | <87o6ecfiho.fsf@localhost> |
| In reply to | #135544 |
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
[toc] | [prev] | [next] | [standalone]
| From | ECNeilson <eric@neilsonhart.com> |
|---|---|
| Date | 2026-09-05 21:16 -0500 |
| Message-ID | <98a39dd8-fa27-4f5b-8cd0-93eee99a158d@neilsonhart.com> |
| In reply to | #135563 |
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
[toc] | [prev] | [next] | [standalone]
| From | legalize+jeeves@mail.xmission.com (Richard) |
|---|---|
| Date | 2026-09-17 17:25 +0000 |
| Message-ID | <118h7q4$3icrv$2@news.xmission.com> |
| In reply to | #135544 |
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>
[toc] | [prev] | [next] | [standalone]
| From | albert@spenarnc.xs4all.nl |
|---|---|
| Date | 2026-09-18 11:23 +0200 |
| Message-ID | <nnd$4dad865c$0146e63a@3e36f6f7a037eed8> |
| In reply to | #135727 |
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.
[toc] | [prev] | [next] | [standalone]
| From | legalize+jeeves@mail.xmission.com (Richard) |
|---|---|
| Date | 2026-09-18 14:12 +0000 |
| Message-ID | <118jgrt$3n6t9$2@news.xmission.com> |
| In reply to | #135731 |
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>
[toc] | [prev] | [next] | [standalone]
| From | ECNeilson <eric@neilsonhart.com> |
|---|---|
| Date | 2026-09-28 21:36 -0500 |
| Message-ID | <a4681024-a77c-4e39-bf3f-1156a94d485d@neilsonhart.com> |
| In reply to | #135727 |
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.
[toc] | [prev] | [next] | [standalone]
| From | ECNeilson <eric@neilsonhart.com> |
|---|---|
| Date | 2026-10-03 23:26 -0500 |
| Message-ID | <119skh1$hbn9$1@dont-email.me> |
| In reply to | #135855 |
Fig-Forth v1.4 for the PDP-11 is published on GitHub: https://github.com/eneilson-zz/PDP-11-Projects/tree/main/fig-forth Copying the Forth.dat file on an FTP upload into a PDP-11 is tricky, so I included instructions on how to do that without corrupting the file. Eric N. 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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.forth
csiph-web