programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

RE: SF Stack

From: Mike Ghan <mikeg_at_logix-controls.com>
Date: Fri, 10 Nov 2000 09:59:46 -0800

So one *could* over/underflow the message loop, but the offending code would
need to be part of the message loop itself.

Mike

-----Original Message-----
From: sftalk-admin_at_forth.com [mailto:sftalk-admin_at_forth.com]On Behalf Of
Rick VanNorman
Sent: Friday, November 10, 2000 9:43 AM
To: sftalk_at_forth.com
Subject: Re: [sftalk] SF Stack

Mike,

The discussion is really good, because this is complicated. The
message loop itself runs as the "foreground" task, and the
callbacks are "interrupts" to it. They are invoked by the
DispatchMessage routine, but when it executes the callback,
the result is essentially a new "virtual machine" on which the
callback runs.

Rick

*********** REPLY SEPARATOR ***********

On 11/10/2000 at 9:32 AM Mike Ghan wrote:

>How does the "classic" windows message loop play into this? It's structure
>appears to be that of a "traditional" Forth program: BEGIN WHILE REPEAT
>which repeats until the program quits.
>
>Mike
>
>>This is exactly correct. In a callback, the stack overflow tolerance is
>>very large, on the order of 2k cells. Underflow is limited to about 4
cells.
>>On each callback entry, a new, empty stack frame is created; on exit the
>>entire stack frame is discarded and only the top value on the stack is
>>returned.

_______________________________________________
Sftalk mailing list Sftalk_at_forth.com
Visit Sftalk on the web at http://www.forthinc.com/mailman/listinfo/sftalk
Received on Fri Nov 10 2000 - 10:12:14 PST

This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:28 PST