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

RE: [colorforth] rtl8139b driver


> 
> On Tue, Nov 30, 2004 at 06:22:07PM -0500, Mark Slicker wrote:
> > Please take a look a the following code which comes from 
> the colorForth 
> > rtl8139b network driver:
> > 
> > : tx ( -b ) [ $2000 block 4 * ] ;
> > : rx ( -b ) [ tx 1536 + ] ; variable ds 1 variable fr 42
> > : n ( -a ) [ ds ] @ [ $10 r ] + ;
> > : send ( an ) [ fr ] @ [ tx ] + swap dup [ fr ] +! move ;
> > : first ( an ) n @ $2000 and drop if [ ds ] dup @ 1 + 3 and 
> swap ! 0 [ fr 
> > ] ! send ; then first ;
> > : last ( an ) send tx [ ds ] @ [ $20 r ] + ! [ fr ] @ 60 max n ! ;
> 
> Excuse this terrible newby question, but is this code
> readable without indication about what color it is?

Read ";" as EXIT. Read "]" as "LITERAL, ]". Read "variable <name> <init.
value>".
BTW it looks like 4IM code.

 Amicalement,
  Frederic


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