home .. forth .. colorforth mail list archive ..

Re: [colorforth] Why is interupts turned off after its code has been discarted by empt


Why is "cli" after "empt" insted of before "empt" is the quesiton I thought
I asked?
Logo may load source  overwriting "cli" to display a complex logo  then
execute empt to clean up  causing cli to execute garbage.

empty cli empt logo ; macro

would be  safe  from my "logo"  displaying ColorForth news form around the
world.
Robert

 Original Message -----
From: "Samuel Falvo" <falvosa@xxxxxxxxx>
To: <colorforth@xxxxxxxxxxxxxxxxxx>
Sent: Thursday, September 04, 2003 7:03 AM
Subject: Re: [colorforth] Why is interupts turned off after its code has
been discarted by empt


> > empty empt logo cli ; macro
> > Why is interupts turned off after its code has been discarted  by empt
>
> ColorForth does not utilize interrupts for things like tending to the
keyboard
> or monitoring serial ports.  It doesn't need them, because it's software,
and
> the software usually written for it, is so simple.
>
> When networking software is compiled, interrupts are required because of
the
> highly event-driven nature that networking requires.  Hence, they are
enabled
> only when networking software is being used.
>
> EMPTY can be run at any moment, and not necessarily in response to a
program
> event.  Hence, when it runs, it has no idea whether or not networking
software
> is being run; therefore, it always makes sure that interrupts are turned
off
> just in case.
>
> The original ColorForth (pre-networking) did not use CLI in the definition
of
> EMPT.  Hence its redefinition in the network code.  Later, it must have
been
> realized that, prior to loading the network application, the original EMPT
> might be called in response to a user event even after the network
application
> is loaded.  This would leave interrupts enabled, and the interrupt vectors
> pointing to software that doesn't technically exist anymore.  Hence, the
odds
> for crashing the system approaches near certainty unless interrupts are
turned
> off at the hardware level.  Hence the introduction of CLI.
>
> --
> Samuel A. Falvo II
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
> Main web page - http://www.colorforth.com


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com