[Coco] PD-10 Forth

Derek John Evans derek.john.evans at hotmail.com
Sat Jan 26 17:16:45 EST 2019


It looks like edit.dat was saved in DECB encoding.  So, I removed the first and last 5 bytes and it loaded fine into newforth.bin.

Its a little quirky, but works as described in FRTHDOC2.TXT.

The editor doesn't work in VCC 80 column mode, but the forth kernal works. So, the points for SuperForth are:

1) Small! Just under 6K
2) Works for the COCO 2 and 3 in 32/40/80 column modes.
3) Comes with an editor (but only works in 32 column)
4) Reads/writes standard ascii files
5) Supports tape and disk.


________________________________
From: Coco <coco-bounces at maltedmedia.com> on behalf of M. David Johnson <mdj at bds-soft.com>
Sent: Saturday, 26 January 2019 1:42 AM
To: 'CoCoList for Color Computer Enthusiasts'
Subject: Re: [Coco] PD-10 Forth

>From within NEWFORTH.BIN I used LOAD EDIT.DAT (no quotes) to successfully load the editor, but I haven't had any success trying to use it yet.

However, I WAS able to use Telewriter 128 to prepare block files.

PD-10 doesn't use raw blocks as some Forths do. It uses text files (with a .DAT extension) which are organized like blocks. Example:

-----

( TSTFIL01.DAT )
( THIS IS TEST FILE FOR BLOCK NUMBER ONE )
0 VARIABLE VAR01
: WORD01 2973 VAR01 ! ;
: WORD02 VAR01 @ U. ;

-----

I've had success using one block per file. I suspect you can put more than one block in a file, but I haven't tried it yet - the one block per file method was especially useful for segmenting the input during debugging.

A few caveats -

FORTH.BIN doesn't seem to work correctly (particularly the LOAD word), 32KFORTH.BIN won't load in Vcc, but NEWFORTH.BIN seems to be okay.

The FRTHDOC files are apparently corrupted, in that FRTHDOC4.TXT appears to just be a copy of FRTHDOC1.TXT. I haven't yet been able to figure out what to do with the FORTHMAN.UL1, 2, and 3 files yet, although they do seem to LOAD without errors.

PD-10 likes all caps.

Like most fig-forths, PD-10 expects a value before the word VARIABLE.

THEN is undefined - use ENDIF instead.

0> is undefined - use : 0> 0 > ;

It doesn't seem to like indentations in word definitions.

I may be doing something wrong, but PD-10 doesn't seem to like stack comments in word definitions - maybe some form of shadow screens would be useful ???

Use a format like LOAD TSTFIL01.DAT (no quotes) to load block files. (Also note: I have experienced some cases where a LOAD resulted in what looked like error messages, yet everything LOADed worked correctly ).

10 0 DO I U. LOOP runs from 0 through 10 instead of from 0 through 9 as would be expected, for example, in 83-Standard Forths.

--
M. David Johnson
mdj at bds-soft.com



More information about the Coco mailing list