From: Groepaz (groepaz_at_gmx.net)
Date: 2003-06-05 17:30:40
On Thursday 05 June 2003 05:33, Greg King wrote: > From: Groepaz > Date: Wednesday, June 04, 2003, 10:09 AM > > > As for the restoring, does it really make sense? Ie., any non-trivial > > program will mess up the memory enough that you would want to reset > > after it anyway? > > From: Ullrich von Bassewitz > Date: Wednesday, June 04, 2003, 11:44 AM > > > On Wed, Jun 04, 2003, at 08:16:52AM -0400, Greg King wrote: > > > Then, before returning to BASIC's READY-prompt, > > > restore DEVNUM from _curunit. > > > > I don't think that restoring DEVNUM makes sense. > > CBM programs are "sticky" (they stay in memory; we can rerun them without > reloading them). That means that we should avoid static initializers; and, > programs should restore their environment, as much as possible. > > A demo-coder's masterpiece might mess up memory so much that you would need > to reset the computer, but most programs should be able to obey a mother's > rule: "Put things back where you found them." :-) yes, generally you are right... BUT, the simple fact that cc65 compiled programs do not even initialize the data section (the data section is statically initialized) would make most non trivial programs not working when they are re-run. so before you even remotely think about restoring the environment after a run, you should maybe think of that the program probably can not be restartet anyway. gpz ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-06-05 17:37:20 CEST