CompuServe Thread

#Multiple Instatiations?

4 messages in this thread
#92755From: karl uppianoMar 4, 1990 4:50 PM
I can see a few cases where it would not be desirable to run multiple invocations of some program, but it just seems inefficient to have to load the same code twice. But if all data is accessed by reference, with few "automatic" variables, it should be pretty straigtforward. –Karl
#92757From: Black Belt SystemsMar 4, 1990 4:55 PM
You can do it either way in the Amiga. No manacles here. Ben Amateur Radio Callsign is A A 7 A S
#92796From: JEFFREY C. DEGEMar 4, 1990 10:57 PM
It isn't automatic variables that cause problems with reentrant code. They are allocated on the stack, so you have a different copy each time you run the function. It's the static variables that cause the problems. These are the variables that end up in the data segments. It isn't too difficult to write reentrant code on the Amy. With Lattice C it's a compiler switch.
#93041From: karl uppianoMar 7, 1990 12:18 AM
You are right, of course. I don't know what I was thinking. –Karl