Re: [Amforth] d>s in amforth (double number > single number)

2018-12-11 Thread Fred Zelders
Thank you Erich 

Fred

> Op 11 dec. 2018, om 18:41 heeft Erich Wälde  het 
> volgende geschreven:
> 
> 
> Hello Fred,
> 
> 
>> The word s>d is in the common/words/ folder but d>s ins't :-(
> 
> : d>s ( d -- s ) drop ;
> 
> Assuming that the high number (2 Bytes) resides on top-of-stack, the low
> number below that.
> 
> Cheers,
> Erich
> 
>> 
>> 
>> Groet!
>> 
>> 
>> Fred
>> 
>> 
>>> Op 11 dec. 2018, om 13:24 heeft Matthias Trute  het volgende 
>>> geschreven:
>>> 
>>> Am Dienstag, den 11.12.2018, 13:02 +0100 schrieb f.zelders--- via
>>> Amforth-devel:
 In gforth the word d>s (It couverts a signed double drecision number
 to a signed single precision number) is part of the default word set.
 This word is not available in the default amforth word set.
>>> 
>>> d>s is simple: DROP since the higher cell shall be 0 for this, you
>>> may want to make sure and throw an exception otherwise, a task
>>> that I happily leave to the reader ;)
>>> 
 
 Can't find a amforth word definition of s>d. 
>>> 
>>> It's in the file common/words/s_to_d.asm. The definition
>>> itself is short, but somewhat surprising
>>> 
>>> : s>d dup 0< ;
>>> 
>>> Matthias
>>> 
>>> 
>>> 
>>> ___
>>> Amforth-devel mailing list for http://amforth.sf.net/
>>> Amforth-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>> 
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> -- 
> May the Forth be with you ...
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/ 
> Amforth-devel@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/amforth-devel 
> 

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] d>s in amforth (double number > single number)

2018-12-11 Thread Erich Wälde

Hello Fred,


> The word s>d is in the common/words/ folder but d>s ins't :-(

: d>s ( d -- s ) drop ;

Assuming that the high number (2 Bytes) resides on top-of-stack, the low
number below that.

Cheers,
Erich

>
>
> Groet!
>
>
> Fred
>
>
>> Op 11 dec. 2018, om 13:24 heeft Matthias Trute  het volgende 
>> geschreven:
>> 
>> Am Dienstag, den 11.12.2018, 13:02 +0100 schrieb f.zelders--- via
>> Amforth-devel:
>>> In gforth the word d>s (It couverts a signed double drecision number
>>> to a signed single precision number) is part of the default word set.
>>> This word is not available in the default amforth word set.
>> 
>> d>s is simple: DROP since the higher cell shall be 0 for this, you
>> may want to make sure and throw an exception otherwise, a task
>> that I happily leave to the reader ;)
>> 
>>> 
>>> Can't find a amforth word definition of s>d. 
>> 
>> It's in the file common/words/s_to_d.asm. The definition
>> itself is short, but somewhat surprising
>> 
>> : s>d dup 0< ;
>> 
>> Matthias
>> 
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>
>
>
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


-- 
May the Forth be with you ...


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] d>s in amforth (double number > single number)

2018-12-11 Thread Fred Zelders
Thank you Matthias!

The word s>d is in the common/words/ folder but d>s ins't :-(


Groet!


Fred


> Op 11 dec. 2018, om 13:24 heeft Matthias Trute  het volgende 
> geschreven:
> 
> Am Dienstag, den 11.12.2018, 13:02 +0100 schrieb f.zelders--- via
> Amforth-devel:
>> In gforth the word d>s (It couverts a signed double drecision number
>> to a signed single precision number) is part of the default word set.
>> This word is not available in the default amforth word set.
> 
> d>s is simple: DROP since the higher cell shall be 0 for this, you
> may want to make sure and throw an exception otherwise, a task
> that I happily leave to the reader ;)
> 
>> 
>> Can't find a amforth word definition of s>d. 
> 
> It's in the file common/words/s_to_d.asm. The definition
> itself is short, but somewhat surprising
> 
> : s>d dup 0< ;
> 
> Matthias
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] d>s in amforth (double number > single number)

2018-12-11 Thread Matthias Trute
Am Dienstag, den 11.12.2018, 13:02 +0100 schrieb f.zelders--- via
Amforth-devel:
> In gforth the word d>s (It couverts a signed double drecision number
> to a signed single precision number) is part of the default word set.
> This word is not available in the default amforth word set.

d>s is simple: DROP since the higher cell shall be 0 for this, you
may want to make sure and throw an exception otherwise, a task
that I happily leave to the reader ;)

> 
> Can't find a amforth word definition of s>d. 

It's in the file common/words/s_to_d.asm. The definition
itself is short, but somewhat surprising

: s>d dup 0< ;

Matthias



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] d>s in amforth (double number > single number)

2018-12-11 Thread f.zelders--- via Amforth-devel
In gforth the word d>s (It couverts a signed double drecision number to a 
signed single precision number) is part of the default word set.
This word is not available in the default amforth word set.

Can't find a amforth word definition of s>d. 
I would very much appreciate when somebody is able to provide the amforth code. 


BTW: I LOVE amforth!


Groet!

Fred


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel