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

Re: [colorforth] DOES> How is colorForth different from other Forths?


On Saturday 13 December 2003 10:09 am, Jeff wrote:
> : simple ( opc <name> -- )
>   CONSTANT DOES> ( rm rd -- )
>     @ >R SWAP 3 LSHIFT + R> + op, ;
>
> \ simple alu instructions
> $4140 simple adc,
> $4000 simple and,


( In MachineForth-like pseudocode, as I cannot post ColorForth here in 
the mailing list )

: simple r> @ >r swap 3 lshift + r> + op, ;

: bic, simple [ $4380 ,
: cmn, simple [ $42c0 ,
: eor, simple [ $4040 ,

( ... etc ... )

It may be possible to define some macro words to automate the process a 
bit.

--
Samuel A. Falvo II


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