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

Re: [colorforth] arrays in source


Another thought on this idea.

colorForth source is already an array. A function of the editor might be
to format sequences of numbers occuring in source as described in my
message below, rather than as a sequence of tagged numbers or large numbers.

A macro could then compile the source address, and advance the interpreter
past the array.


On Fri, 26 Dec 2003, Mark Slicker wrote:

> colorForth has the concept of source code as data, prominently the magneta
> variable.
>
> In the colorForth preparsed source there is potential for whole arrays to
> be stored in source.
>
> Large numbers require 2 32-bit words.
>
> 5 bits of the first 32-bit word denotes the color of the number and the
> type of display. The second word is the actual number.
>
> To generalize this, let the remaining 27 bits of the first word denote a
> count, and let there be a corresponding number of 32-bit words which folow
> the first word.
>
> For count > 1 place the address in source on the data stack, otherwise
> place the actual number.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
> Main web page - http://www.colorforth.com
>
>

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