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

Re: [colorforth] Machineforth IFs


I have been playing with the idea of flags.  Two is all that I seem to use 
regularly, zero and carry.  all alu instructions would set the flag, and a 
compare instruction.  (cmp would compare the top two values, but only 
drop the top value.)  I also have included 4 'if' command they are 
jmp[not](zero|carry), I did also find it convient to add one other 
instruction, ?1+, inc if carry set.
	Frank


On Thu, 23 Jan 2003 frederic.dubois@xxxxxxxxxxxxx wrote:

> From: =?iso-8859-1?Q?Fr=E9deric_DUBOIS?= <frederic.dubois@xxxxxxxxxxxxx>
> 
> 	Hello,
> 
> I wrote a standalone DYI Forth, 4IM, which is not a ColorForth but in which
> I try to pick as much as possible from ColorForth and machineForth.
> I'm attracted by the idea of a non-dropping IF of machineforth because it
> wolud be shorter and faster in my system as I inline it in the form of 8086
> machine instructions.
> I've studied a little bit my code and it appears than one-third of the IFs
> could be machineForth IFs. Another one-third is used in my assembler which I
> think is the worst thing to implement. The last third part would not benefit
> from a replacement and it is the part which interest me. As those IFs would
> be replaced at first sight by ... IF DROP ... THEN ( maybe) DROP ... I worry
> about the fact that globally the code size may inflate. I think in
> particular about all the cases where IF tests a flag which is typically not
> used further in the computation.
> Is there particular techniques which are to be used with machineforth IFs? 
> 
> 
> ---------------------------------------------------------------------
> 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