From: <f.z...@me...> - 2018-12-11 12:02:46
|
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 |
From: Matthias T. <mt...@we...> - 2018-12-11 12:25:12
|
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 |
From: Fred Z. <fze...@gm...> - 2018-12-11 12:29:51
|
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 <mt...@we...> 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/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Erich W. <ew....@na...> - 2018-12-11 17:41:23
|
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 <mt...@we...> 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/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel -- May the Forth be with you ... |
From: Fred Z. <fze...@gm...> - 2018-12-11 17:57:59
|
Thank you Erich π Fred > Op 11 dec. 2018, om 18:41 heeft Erich WΓ€lde <ew....@na...> 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 <mt...@we...> 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/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > -- > May the Forth be with you ... > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ <http://amforth.sf.net/> > Amf...@li... <mailto:Amf...@li...> > https://lists.sourceforge.net/lists/listinfo/amforth-devel <https://lists.sourceforge.net/lists/listinfo/amforth-devel> |