Hi All
I'm working on a project for an old PET computer. It is a Pet Forth adapted for a Commodore Pet. It runs with BASIC 1 ROMs. I told you it was old. It runs at 800 hex. I don't have a Pet so have been working remotely.
There is a thread on the vcf Forum called Petsoft 6502 FORTH.
There is a *.tap file on the first post and a *.prg on post # 7. There is a copy of the Apple manual on post #10. I've created a listing of sorts on post #80. Don't use the one on #78, it is missing significant chunks of code.
It is an early Forth and a lot of the words you may be familiar with are missing.
It looked like it was being meta-compiled from a APPLE to run on the PET ( note ROMs for BASIC 1 ). I has an error in it that several words were duplicated. The dictionary is intact but I suspect while meta-compiling, they used the same screen twice as the code is the same. The only thing is, they left out a few words from the APPLE version
. One that I think one would want was PRINT ( see the Apple manual for how it works ). I've been trying to write it with the unfamiliar Forth. I don't have a PET, let alone one with ROM BASIC 1 and 16K.
Also, 6502 is not my heaviest language. In the listing I've left out the dictionary headers to remove clutter, I just put the names in, so one couldn't reassemble it without some editing.
I'm hoping to solicit some help here.
One of the words that I would like to use is WHILE but unlike later Forths, there is no REPEAT word. It doesn't have any compiler security so I think I can use THEN to do the back patching but it also needs to patch the loop back. I suspect it was work in progress. Also, if someone can run it, I'd like to know if the word IBP ( In Buffer Pointer ) is a moving pointer or just a pointer to the beginning of the input buffer. I really need a running pointer for the PRINT word.
This Forth does a lot of data stack checking so should be relatively robust, even though relatively small.
My listing could use more comments as well. If someone has something to add, please use only lower case for comments and labels. I have reserved upper case for dictionary names.
It should be a fun project.
Dwight