[OpenBIOS] Dictionary size limit per device instance
parag at codegen.com
Fri Aug 31 05:05:29 CEST 2007
Segher Boessenkool wrote:
>Some Open Firmware implementations have a special FCode x'f4 which
>allows FCode#s up to x'ffff; x'f4 followed by "high" byte, "low" byte.
SmartFirmware currently doesn't allow Fcodes greater than 0xFFF, as per
the (current) spec. But that's only for tokenizing, so that the
resulting image file is 1275-compliant. SF's internal Forth
execution-token representation is mostly Fcode to save memory.
Forth toks that aren't tokenzied/fcodes are limited to 0x3FFF_FFFF. The
vendor-specific marker 0x6 is used to indicate a token value greater
than 0xfff. 2 additional bytes for values 0x1000:0x7fff, 3 more bytes
for 0x8000:0x3fffff, and 4 bytes for 0x400000:0x3fffffff.
The 1st MSB bits of the byte after the 0x06 indicates 4, 3, or 2
additional bytes: 0xC0 == 4; 0x80 == 3; else 2. No reason that
some scheme like this couldn't be used for extending Fcodes too.
(SF also uses the vendor-specific range codes 0x7* as a sort of prefix
for internal use. It's also not used for tokenizing.)
Anyway, just throwing this out, for what it's worth.
/__)_ _ _ _ "For three days after death hair and fingernails continue
/ (// (/(/ to grow but phone calls taper off." -- Johnny Carson
More information about the OpenBIOS