Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fig-FORTH model and editor

400 views
Skip to first unread message

David Schultz

unread,
May 14, 2013, 7:17:23 PM5/14/13
to
After it was noted in another thread that the model was missing from the
documents on the fig web site, I dug out my copy and scanned it. I
posted links to the results and notified the FORTH Interest Group and it
has now found a permanent home there:

http://www.forth.org/fig-forth/fig-forth-model.pdf

Now that it has a home I have deleted it from my pages.

I have been working on the editor portion of the document and tried out
OCR on it. This works great on the straight text editor manual but not
so well on the glossary and even worse on the source screens. After a
bit of work I have the editor in a plain text format. It seems certain
that I missed some errors and introduced others so another set of eyes
would help.

http://home.earthlink.net/~schultdw/tmp/editor.pdf
http://home.earthlink.net/~schultdw/tmp/editor.zip


--
David W. Schultz
http://home.earthlink.net/~david.schultz
Returned for Regrooving


Clyde W. Phillips Jr.

unread,
May 16, 2013, 1:12:44 PM5/16/13
to
On Tuesday, May 14, 2013 6:17:23 PM UTC-5, David Schultz wrote:
~
> David W. Schultz
>
> http://home.earthlink.net/~david.schultz
>
> Returned for Regrooving

Hi David, nice .s.

I still do fig so if I can help I will.

So what fig target is this model?

Thanks for sharing!

Cheers, Clyde

Coos Haak

unread,
May 16, 2013, 7:04:37 PM5/16/13
to
Op Thu, 16 May 2013 10:12:44 -0700 (PDT) schreef Clyde W. Phillips Jr.:
According to the header lines of machine dependent screens 6,7,8: Tim,
Apple, Sym-1. Definitely (I've only heard of Apple II) 6502 machines.
This seems a corrected version, U* was buggy and is repaired in screen 23.

This model was faithfully ported to a lot of other machines, like the copy
I have for my ELF-II, with a 1802 processor.

--
Coos

CHForth, 16 bit DOS applications
http://home.hccnet.nl/j.j.haak/forth.html

David Schultz

unread,
May 16, 2013, 7:09:31 PM5/16/13
to
On 05/16/2013 12:12 PM, Clyde W. Phillips Jr. wrote:
> Hi David, nice .s.
>
> I still do fig so if I can help I will.
>
> So what fig target is this model?
>
> Thanks for sharing!
>
> Cheers, Clyde
>

It is part of the document titled:

fig-FORTH INSTALLATION MANUAL

GLOSSARY
MODEL
EDITOR


My copy is release 1 of November 1980.

The model is targeted at the 6502 with console I/O examples for TIM,
Apple, and SYM-1. What makes it interesting is that it is fig-FORTH
written in FORTH for a meta-compiler while the 6502 listing on the fig
site is for an assembler.

The editor can be used with any target. If no one points out any
problems, I will send it on to fig so they can add it to the collection.

--

David Schultz

unread,
May 25, 2013, 10:48:21 AM5/25/13
to
On 05/14/2013 06:17 PM, David Schultz wrote:
> I have been working on the editor portion of the document and tried out
> OCR on it. This works great on the straight text editor manual but not
> so well on the glossary and even worse on the source screens. After a
> bit of work I have the editor in a plain text format. It seems certain
> that I missed some errors and introduced others so another set of eyes
> would help.
>
> http://home.earthlink.net/~schultdw/tmp/editor.pdf
> http://home.earthlink.net/~schultdw/tmp/editor.zip
>
>

Well no one whined about OCR errors so I sent this on to fig. I spent a
little time typesetting it and producing two pdfs: one for the screens
and the other has the manual and glossary. (For the curious I used
groff.) These have some additional corrections and are more correct than
the text files.

Paul Rubin

unread,
Jun 8, 2013, 3:40:15 AM6/8/13
to
David Schultz <ab...@127.0.0.1> writes:
> It is part of the document titled:
> fig-FORTH INSTALLATION MANUAL
> GLOSSARY
> MODEL
> EDITOR

David, if you're still reading this thread, do you mean to say there is
a glossary for the model interpreter? It would be nice to have a scan
of that. I've had a few short looks at the code but it's hard to find
my way around it without any familiarity. A glossary would surely help.

David Schultz

unread,
Jun 8, 2013, 7:53:19 AM6/8/13
to
The installation manual and glossary was already available on the fig site:

http://www.forth.org/fig-forth/contents.html

I just scanned the parts of the document that were missing.

Paul Rubin

unread,
Jun 8, 2013, 12:22:47 PM6/8/13
to
David Schultz <ab...@127.0.0.1> writes:
> The installation manual and glossary was already available on the fig site:
> http://www.forth.org/fig-forth/contents.html
> I just scanned the parts of the document that were missing.

Oh great, thanks. I hadn't figured out that was the doc.

Lars Brinkhoff

unread,
Jun 17, 2013, 3:14:48 AM6/17/13
to
David Schultz wrote:
> After it was noted in another thread that the model was missing from
> the documents on the fig web site, I dug out my copy and scanned it.
>
> I have been working on the editor portion of the document and tried
> out OCR on it.

What about the model part, anyone OCR'ing that? If not, I'll do it.

David Schultz

unread,
Jun 17, 2013, 6:11:00 PM6/17/13
to
I already have but it needs a lot of cleanup which is more work than I
care for. But if others want to jump in and take a page (or ten)...


Scanned text:

http://home.earthlink.net/~schultdw/tmp


I have already cleaned up the first page of the model (page 27) and
added groff commands for formatting.

Lars Brinkhoff

unread,
Jun 18, 2013, 1:59:51 AM6/18/13
to
David Schultz wrote:
> Lars Brinkhoff wrote:
>> What about the model part, anyone OCR'ing that? If not, I'll do it.
>
> I already have but it needs a lot of cleanup which is more work than I
> care for. But if others want to jump in and take a page (or ten)...

I have cleaned up screens 6-56 so far.

Lars Brinkhoff

unread,
Jun 18, 2013, 8:10:46 AM6/18/13
to
Done. I tried to preserve the exact amount of whitespace.

http://lars.nocrew.org/fig.txt

Lars Brinkhoff

unread,
Jul 3, 2013, 7:09:48 AM7/3/13
to
David Schultz and I conversed:
>>>> What about the model part, anyone OCR'ing that?
>>> I already have but it needs a lot of cleanup
> I tried to preserve the exact amount of whitespace.
> http://lars.nocrew.org/fig.txt

I have now run the text through a compiler (of sorts). This detected
some more OCR typos. The result is now probably very close to the
original. The updated file is available throught the same URL above.

I have noted a few oddities:
SCR # 23 dated 1980; what is "C;"?
SCR # 45 text beoynd column 64.
SCR # 61 references "." which is defined in screen 76.
SCR # 68 unbalanced control-flow stack.
SCR # 72 dated dec 79; "U<" is undefined; text (in PDF) is small.
SCR # 76 line 13 is strange.

My "compiler" does some consistency checks and emits an index of all
definitions:

SCR # 6: EMIT KEY CR ?TERMINAL
SCR # 7: HOME SCROLL
SCR # 8: KEY EMIT CR ?TERMINAL
SCR # 12:
SCR # 13: LIT PUSH PUT NEXT
SCR # 14: SETUP EXECUTE
SCR # 15: BRANCH 0BRANCH BUMP:
SCR # 16: (LOOP) L1: L2: (+LOOP)
SCR # 17: (DO) POPTWO POP I
SCR # 18: DIGIT
SCR # 19: (FIND)
SCR # 20: ENCLOSE
SCR # 21: EMIT KEY ?TERMINAL CR
SCR # 22: CMOVE
SCR # 23: U*
SCR # 24: U/
SCR # 25: AND OR XOR
SCR # 26: SP@ PUSH0A SP! RP! ;S
SCR # 27: LEAVE >R R> R
SCR # 28: 0= 0<
SCR # 29: + D+ MINUS DMINUS
SCR # 30: OVER DROP SWAP DUP
SCR # 31: +! TOGGLE
SCR # 32: @ C@ ! C!
SCR # 33: : ;
SCR # 34: CONSTANT VARIABLE USER
SCR # 35: 0 1 2 3 BL C/L FIRST LIMIT B/BUF B/SCR +ORIGIN
SCR # 36: TIB WIDTH WARNING FENCE DP VOC-LINK BLK IN OUT SCR
SCR # 37: OFFSET CONTEXT CURRENT STATE BASE DPL PLO CSP R# HLD
SCR # 38: 1+ 2+ HERE ALLOT , C, - = < > ROT SPACE -DUP
SCR # 39: TRAVERSE LATEST LFA CFA NFA PFA
SCR # 40: !CSP ?ERROR ?COMP ?EXEC ?PAIRS ?CSP ?LOADING
SCR # 41: COMPILE [ ] SMUDGE HEX DECIMAL
SCR # 42: (;CODE) ;CODE
SCR # 43: <BUILDS DOES>
SCR # 44: COUNT TYPE -TRAILING (.") ."
SCR # 45: EXPECT QUERY X
SCR # 46: FILL ERASE BLANKS HOLD PAD
SCR # 47: WORD
SCR # 48: (NUMBER) NUMBER -FIND
SCR # 49: (ABORT) ERROR ID.
SCR # 50: CREATE
SCR # 51: [COMPILE] LITERAL DLITERAL ?STACK
SCR # 52: INTERPRET
SCR # 53: IMMEDIATE VOCABULARY FORTH DEFINITIONS (
SCR # 54: QUIT ABORT
SCR # 55: COLD
SCR # 56: S->D +- D+- ABS DABS MIN MAX
SCR # 57: M* M/ * /MOD / MOD */MOD */ M/MOD
SCR # 58: USE PREV +BUF UPDATE EMPTY-BUFFERS DR0 DR1
SCR # 59: BUFFER
SCR # 60: BLOCK
SCR # 61: (LINE) .LINE MESSAGE
SCR # 62: LOAD -->
SCR # 63:
SCR # 64:
SCR # 65: DATA STATUS #HL
SCR # 66: D/CHAR ?DISC
SCR # 67: BLOCK-WRITE
SCR # 68: BLOCK-READ
SCR # 69: R/W
SCR # 70:
SCR # 71:
SCR # 72: ' FORGET
SCR # 73: BACK BEGIN ENDIF THEN DO LOOP +LOOP UNTIL
SCR # 74: END AGAIN REPEAT IF ELSE WHILE
SCR # 75: SPACES <# #> SIGN # #S
SCR # 76: D.R D. .R . ?
SCR # 77: LIST INDEX TRIAD
SCR # 78: VLIST
SCR # 79: MON
SCR # 80:

Andrew Haley

unread,
Jul 3, 2013, 7:26:32 AM7/3/13
to
Lars Brinkhoff <lars...@nocrew.org> wrote:
> David Schultz and I conversed:
>>>>> What about the model part, anyone OCR'ing that?
>>>> I already have but it needs a lot of cleanup
>> I tried to preserve the exact amount of whitespace.
>> http://lars.nocrew.org/fig.txt
>
> I have now run the text through a compiler (of sorts). This detected
> some more OCR typos. The result is now probably very close to the
> original. The updated file is available throught the same URL above.

That is fantastic. Thank you for the work!

Andrew.
0 new messages