BDS Software

CF83 - Which Standard?

CF83 is a 1983 Standard Forth for the CoCo 2 or 3.

Why did I choose to conform CF83 to the Forth-83 Standard, rather than to the more universal ANSI Standard? Two reasons:

1. At the time I wrote CF83 (1991), the ANSI Standard (1994) did not yet exist.

2. Okay, reason #1 should be sufficient - There's no need for any reason #2.

Seriously, though, I suppose I could have gone back and revised CF83 sometime after 1994, and made that revision ANSI compliant. However, the primary purpose of the ANSI Standard was to encourage Forths to be portable from one architecture to another; i.e. the same Forth program should run in exactly the same way whether it was running under a Forth on a little-endian 8086 or on a big-endian 68000; or on machines with 1-bit, 4-bit, 8-bit, or 16-bit (or other) addressing.

Such portability, however, translates into larger Forth dictionaries and, hence, less memory space for programs. And Laxen & Perry's Forth-83 Standard F83 was already available on the 8086. And, furthermore, the CoCo's PMODE graphics and other distinctive features would never translate to other machines.

So, I intentionally decided to leave CF83 as Forth-83 Standard, rather than converting it to ANSI.

This does mean that, when you encounter Forth programs in the literature, you may have to do some translating to ensure that they will run properly under CF83.

For example, CELLS is a word frequently found in ANSI Standard Forth programs. It's definition is:

CELLS ( n1 -- n2 )
n2 is the size in address units of n1 cells.

CELLS doesn't exist as a word in the Forth-83 Standard.

Since the CoCo is byte-addressable, and CF83 numbers (i.e. cells) are 16-bits, you can run such an ANSI program in CF83 (assuming any other necessary translations are also properly completed) if you preceed loading the program with the following definition in CF83:

: CELLS ( n1 -- n2 ) 2 * ;

For your reference, the Forth-83 Standard can be found at Forth-83 Standard.

And, the original 1994 ANSI Standard can be found at 1994 ANSI Standard.

Also for your reference, the most recent (2012 as of this writing) ANSI Standard can be found at 2012 ANSI Standard.