Re: How are words truncated?
| Newsgroups | gmane.comp.lang.forth.colorforth |
|---|---|
| Message-ID | <[email protected]> |
Characters are packed into the upper 28-bits of a 32-bit word, but the last character may extend the length of the characters past 28-bits if the extended bits of the character are zero. 'pack' will always pack as many characters as possible in a preparsed word. ---- Original message ---- >Date: Mon, 20 Jun 2005 21:52:31 +0200 >From: [email protected] (Albert van der Horst) >Subject: [colorforth] How are words truncated? >To: colorforth mailing list <[email protected]> > >One of the most annoying things remaining in my meta- assembler is >the situation with extension words, where a Huffman token spans >two 32 bit longs. >E.g. screen 18 reads > > (colorf +orth (Jul3 +1 ... >code 9 0 A 0 > >This is of course ugly. > >Can anybody confirm this rule of splitting : >- tentatively add one more character.(This may fill in below zero bits!) >- if any bit below 5 is up, (including the below zero bits) > it fails, and this character and following spill to the next long. > >Is it possible or allowed to split differently over longs e.g. >(color +forth (Jul +31 > >The latter would require that a true meta-assembler could not >always interpret `` (colorforth '' into two tokens in an >unambiguous way. But it could still allow it as a convenience for >people who don't care. > >Thanks! > >Groetjes Albert > >-- >Albert van der Horst,Oranjestr 8,3511 RA UTRECHT,THE NETHERLANDS >Economic growth -- like all pyramid schemes -- ultimately falters. >[email protected] http://home.hccnet.nl/a.w.m.van.der.horst > >------------------------------------------------------------ --------- >To unsubscribe, e-mail: colorforth- [email protected] >For additional commands, e-mail: colorforth- [email protected] >Main web page - http://www.colorforth.com >