home .. forth .. colorforth mail list archive ..

Re: [colorforth] color assignment




---- Original message ----
>Date: Sat, 25 Oct 2003 18:11:35 -0700
>From: "Samuel A. Falvo II" <kc5tja@xxxxxxxx>  
>Subject: Re: [colorforth] color assignment  
>To: colorforth@xxxxxxxxxxxxxxxxxx
>
>On Saturday 25 October 2003 02:02 pm, maslicke@xxxxxxxxxxx wrote:
>> 0 - extension
>> 1 - yellow word
>> 2 - green word
>> 3 - yellow short
>> 4 - green short
>> 5 - yellow number
>> 6 - green number
>> 7 - cyan word
>> 8 - red word
>> 9 - comment
>> 10 - Capitalized
>> 11 - ALL CAPS
>> 12 - magenta variable
>
>It would seem to me that extensions would be relatively rare
occurances.

No this is not the case, whenever a huffman packed word cannot
be contained within the 28-bit field, one or more extension
words are required. Also the token with the value '0'
indicates the end of a token sequence.
 
>Would the following arrangement produce a simpler layout?

[ snip ]

I don't see that this will simplify any existing code except
for where yellow and green are paired.

>However, I'm not seeing any type for hexadecimal versus decimal 
>presentation formats.  How is that handled in ColorForth?  I
thought 
>each had their own, unique token.

bit 4 of the number types, see:
http://www.colorforth.com/parsed.html

>
>> It should be pretty obvious why the code is simpler. Given the
>> color is yellow (1) or green (2), to get the color for short
>> you add 2, to get the color for number you add 4.
>
>I'm not sure why this would help.  Wouldn't something like
this be best 
>implemented as a jump-table?

Show me. You snipped the reference at top, I am refering to
the word 'format' in the assembler source. I need to check
that my implementation is correct, however the change in color
assignment does apear to simplify this code.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com