GARTHWILSON wrote:
I just looked in my old paper ANS Forth spec and found what I was sure was there, §3.1.3:
"Cells shall be at least one address unit wide and contain at least 16 bits. The size of a cell shall be an integral multiple of the size of a character."
Ah, that's an interesting wrinkle. So for the PDP-8, that would seem to imply a minimum cell size of two words (24 bits) unless the size of a character is itself implementation-dependent.
Lord only knows what 18-bit systems would do.
Dr Jefyll wrote:
Apparently not, if it's ANS compliant. (Thanks, Garth, for the reference.) You'd need two 12-bit words to reach the 16-bit minimum for a cell, so CELL would return 2. But certainly a non-compliant Forth could use 12-bit cells and reside in a 4 Kword space, in which case CELL would return 1. Except the word CELL might not exist -- you'd have to trim a lot of the non-essentials in order to fit in so cramped a space!
Well, if it's an -8 with extended addressing (which is, I think, most of them,) there's up to 32 KW to work with, although I'm not up on what the ANS standard implies for address sizes and/or segmented address space.