|
From: pito <pi...@vo...> - 2010-07-07 14:17:00
|
google knows - trailing dot.....:
> 2variable euro1
ok
> 1300200100. 2constant euro2
ok
> 1300200100. euro1 2!
ok
> euro2 euro1 2@ d+ ud.
2600400200 ok
> Pito
----- PŮVODNÍ ZPRÁVA -----
Od: "pito" <pi...@vo...>
Komu: pi...@vo..., amf...@li...
Předmět: Re: [Amforth-devel] 2variable
Datum: 7.7.2010 - 15:38:07
> I am trying with:
>
> : 2variable ( "name" -- ) create 0 , 0 , ;
>
> It seems the 2constant and 2variable needs the number
> entered as:
>
> w_low w_high 2constant dollars ( w_high*2^16 + w_low
> )
>
> 2variable euro
> w_low w_high euro 2!
>
> Does Amforth know somehow to compile double cell input?
> E.g.:
>
> 123456789 @constant dollars
> 98765432 euro 2!
>
> Pito
>
>
>
>
> ----- PŮVODNÍ ZPRÁVA -----
> Od: "pito" <pi...@vo...>
> Komu: amf...@li...
> Předmět: [Amforth-devel] 2variable
> Datum: 7.7.2010 - 1:16:07
>
> > Hi friends, I've found 2constant in lib but I cannot
> > > find 2variable in
> > the libraries. Is that word available in amforth
> > 4.0?
> > > I'm going to redo
> > a routine I'm using in my PIC dev for a quite precise
> > > 1sec tick:
> > int32 Ticker;
> > TIMER2_FREQUENCY 19999870 (in Hz=xtal freq when atmega,
> > > /4 when pic)
> > #int_TIMER2
> > void TIMER2_isr()
> > {
> > Ticker -= 65536; // Decrement
> > > ticker by clocks
> > per interrupt (16bit timer), or 256*prescaler when
> > > atmega32 and timer2
> >
> > if ( Ticker < 65536 ) // If second
> > > has expired
> > { Ticker += TIMER1_FREQUENCY; // Increment
> > > ticker by clocks
> > per second
> > Seconds++; // Increment
> > > number of seconds
> >
> > }
> >
> > The 2variable is required for higher precision. Any
> > > help where to find
> > 2variable?
> > Pito.
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > > > > > This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> > > _______________________________________________
> > Amforth-devel mailing list
> > Amf...@li...
> > https://lists.sourceforge.net/lists/listinfo/amforth-devel
> >
>
|