[colorforth] Color Forth and ColorForth Conventions
- Subject: [colorforth] Color Forth and ColorForth Conventions
- From: "John A. Peters" <japeters@xxxxxxxxxxx>
- Date: Sun, 20 Jun 2004 15:27:11 -0700
- Cc: <win32forth@xxxxxxxxxxxxxxx>, <colorforth@xxxxxxxxxxxxxxxxxx>
If we were to change the header structure so each word in the dictionary
stored a bite or cell to declare it's color, it might be worth it. Or there
may be some unused space ready to use, according to the map below. Can we
use the 4 unused bites in the BFA? 7 6 5 4 gives us 4 bytes which is 0 thru
15, or 16 numbers, right? Wea re using 15 colors now, so this is enough for
now. When it works well we might switch to a whole cell that could store a
hex number, or better yet a decimal color declaration like CC 00 CC. Then
there would be room for bold and italics sounds, etc.
How does ColorForth store the colors?
\s
\ ---------------------------------------------------------------------
\ Header structure as of May 2003 for Win32Forth
\ ---------------------------------------------------------------------
\
\ [ link field ] -4 +0 LFA
\ +- [ cfa ptr field ] +0 4 CFA-PTR
\ | [ byte flag ] 4 8 BFA
\ | [ count byte ] 5 9 NFA
\ | [ the name letters ] 6 10
\ | [ alignment bytes ] 0 to 3 bytes for name alignment
\ | [ view field ] n+0 VFA <- head-fields, all are
optional
\ | [ file field ] n+4 FFA
\ | [ optimize field ] n+8 OFA
\ |
\ v
\ [ cfa field ] +0 CFA
\ [ body field ] +4 PFA
\
\ BFA: MSB 8 128 IMMEDIATE flag
\ 7 64 unused
\ 6 32 unused
\ 5 16 unused
\ 4 8 unused
\ 3 4 OFA set if OFA is present
\ 2 2 FFA set if VFA is present
\ LSB 1 1 VFA set if VFA is present
\ -------------------------------------------------------
Thank You,
John A. Peters, japeters@xxxxxxxxxxx
Win32Forth applications, specifications and beta testing.
I am a non-programmer, with more ideas than expertise.
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com