![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Hmm, since the floating point stack is located in the dictionary, and
the dictionary space is initialized afresh with every call back, seems
to me that the FSTACK call needs to be referenced every time. Or I
may be missing something.
If you look at the code both /NDP and FSTACK call /FSTACK so the
sequence is irrelevant.
Gene
> Many thanks! Last night I discovered that /NDP wasn't sufficient. To =
> get my FP check to work, I had to add something like " /NDP 64 FSTACK." =
> I hadn't considered the re-allocation problem. One puzzle: your =
> comment says that NDP needs the stack allocated first, but my ordering =
> worked (luck of the Irish?).
>
> -----Original Message-----
> From: wheath_at_comcast.net [mailto:wheath_at_comcast.net]
> Sent: Wednesday, May 04, 2005 4:20 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] Re: Floating Point Within A Dialog
>
>
> Not only does the floating point package need to be initialized in every =
> callback but the floating point stack also has to be allocated. 'N0 the =
> float stack pointer is NOT initialized for callbacks.
> However, you don't want to allocate the stack too many times or you run =
> out of memory for the callback and get a Dictionary Full error message =
> from Swiftforth.
> I use the following successfully,
> : INITFP ( - )
> <<F 'N0 @ HERE <> \ see if this callback has been =
> initialized yet
> IF 16 FSTACK \ so only once per callback
> THEN /NDP F>> ; \ /ndp needs stack allocated first
>
> The callback has to use this for every message received but some =
> messages use the same ram, hence the 'N0 test.
> Warren Heath ( wheath at comcast.net )
>
> -------------- Original message --------------=20
>
> > Thanks Gene and Rick. I did try initializing the floating point stack =
> =3D=20
> > in the callback (no luck) but didn't mention it. Although the the FP =
> =3D=20
> > package includes an /NDP in an "onenvload:" statement it didn't occur =
> to =3D=20
> > me that the callback also needed it.=20
> >=20
> > -----Original Message-----=20
> > From: Gene LeFave [mailto:gene_at_tekdata.com]=20
> > Sent: Tuesday, May 03, 2005 2:01 PM=20
> > To: sftalk_at_forth.com=20
> > Subject: [sftalk] Re: Floating Point Within A Dialog=20
> >=20
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and bug=20
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and bug
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed May 04 2005 - 10:36:43 PDT
This archive was generated by hypermail 2.2.0 : Thu Dec 04 2008 - 03:04:20 PST