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

Re: [colorforth] Back and forth to machine code in blocks.


On Mon, Jan 10, 2005 at 09:21:48PM -0600, Ray St. Marie wrote:
> > 
> > I'm slow, so save me if I have this wrong. As I'm reading this i'm thinking ...
> > The front 18 assembler blocks of the colorforth could be converted from
> > colorforth to assembler with this?
> Sorry, got that backwards -- ment to say....
> The front 18 assembler blocks of the colorforth could be converted from 
> assembler to colorforth with this?

You can go back and forth, such as I said.

So a practical way in colorforth would be to have
1. the assembler far away  (block 200)
2. a copy of the first 18 blocks in block 18...35 but with assembler
code instead of machine code.
There may be a problem there, my assembler assumes ASCII, but a color
forth assembler would maybe not.

The procedure for a change would be :
1. edit in block 18 ..35 
2. load the assembler and convert the block edited,
put the result in the corresponding block 18 lower.
3. Use block 0 ..18 as before.

So the difference would be that one never edits the machine
code.

The assembler is started by the word { and stops by }.

The disassembler is combined with a clever miniparser that
only assembles $1234 2, phrases. It disciminates between
$1234 2, and $1234 and by inspecting depth, so let Jeff Fox
not hear it. This may be problematic, but there is no reason
to use the disassembler, except for generating the original
source once. I could do it on my Linux system, once and for 
all.

The USB stick must accomodate an extra 18 blocks ;-)

Regards the mini-assembler. It will be part of the next ciforth
distribution. But it has been published already on the 
comp.lang.forth newsgroup. It consists for more than half
out of the opcodes, but there is some porting effort needed
on colorforth. If Chuck insists on using SIB bytes,
an extra screen will be needed on top of the six of the mini
assembler. (Personally I would prefer a small code change,
over adding another 20 words in the assembler.)

> 
> My applologies .

No problrem.
Thanks for the kind words.

> Ray St. Marie
> --
> Rastm2 At users dot sourceforge dot net
> Ray.StMarie AT gmail DOT com
> Ray.StMarie AT sbcglobal DOT com
> Raystm2 in  irc.freenode.net /join #c4th #c4th-ot #forth #retro
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
> Main web page - http://www.colorforth.com
> 

-- 
Albert van der Horst,Oranjestr 8,3511 RA UTRECHT,THE NETHERLANDS
        One man-hour to invent,
                One man-week to implement,
                        One lawyer-year to patent.
albert@xxxxxxxxxxxxxxxxxx http://home.hccnet.nl/a.w.m.van.der.horst

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