BigEd wrote:
Thanks Jeff!
I notice our own chitselb has written a
new Forth for PET and was previously
casting around on comp.sys.cbm for an earlier PET forth - perhaps the "terrible" one. That
thread contains a similar history to what I found - hopefully coherent with my findings.
Cheers
Ed
Eureka! I have found it! There were hints on the volksForth pages about it also running on a PET, but I haven't been able to find a binary copy of volksForth for PET. Most of my experience comes from Blazin' Forth on a C=64 and MMSForth on a TRS-80 Model 4. However, now I do have this Fig Forth 1.0, and in fact, this is the first running Forth I have ever used on a PET. Cassette support is definitely a thing here.
It comes up and says "FIG FORTH 1.0" and it even uses the Commodore zeropage CHRGET routine at $0070-$0087, as well as making a copy of stuff that BASIC wants to have around (as part of the cold start routine.) Hopping in and out of Forth/TIM/BASIC works. I haven't yet figured out the setup steps required for using BLOCK with the disk ('2 BLOCK' returns $C9FD, an address in ROM. '3 BLOCK' hangs the machine).
So I'm in there digging around trying to figure out what does what. Here are tick ( ' ) addresses of a few words I'm interested in and some early findings. To get around the problem of the Commodore tape i/o routines failing out to a BASIC READY prompt, it seems that the authors of this Forth could have just restored BASIC pointers prior to doing any *dangerous* operations. But it is late, I am lazy, and manually decompiling secondaries is tedious, so I do not know this for sure. It is pretty clear that this Forth doesn't use BLOCK with the tapes, and probably no commie Forth ever did, but it does provide words for save/load operations.
Someone on the cbm-hackers list wrote:
Although I never even tried to used it, fig-forth 1.0 survived on my old disks.
There is a 16k and a 32k version.
I placed a .d82 image at
http://www.idealine.info/CBM/forth.d82Code:
*** commodore basic 4.0 ***
31743 bytes free
ready.
load"forth32k.4",8
searching for *
loading
ready.
run
fig-forth 1.0
2 block hex .
-3603
mon
b*
pc irq sr ac xr yr sp
.; 1cba e455 b0 00 ff 00 fd
.x
ready.
list
10 sys1037
ready.
word address notes
device# 1e3f variable, contains '8'
-c-> 1e4a no idea what this is yet
dim() 1e8a
namset 1f69 looks like a secondary
setdevice# 2004
cassload 201d
memset 204a
cassave 2068
verify 20cd
cass1 20e7 : cass1 ( -- ) 1 device# ! ;
cass2 20f9 : cass2 ( -- ) 2 device# ! ;
syssize 210d
device# ?
1
cass2 device# ?
2
device# ?
2
cass1
device# ?
1
cold
fig-forth 1.0
device# ?
1
bye
ready.
run
fig-forth 1.0
device# ?
1