----- Original Message -----
From: "Jim Battle" <frustum(a)pacbell.net>
To: "General Discussion: On-Topic and Off-Topic Posts"
<cctalk(a)classiccmp.org>
> In any case, I never understood the stigma of
using self
> modifying code. It does require careful documentation if
> it is expected to be maintained. There is no reason why
> it can't be as robust as any other code if done properly.
> I suspect it was used as a sales talk when someone was
> trying to pitch their version of code to be better than
> someone else's. Such things as overlays would qualify as
> more risky uses of self modifying code but that is done
> without mention.
I remember a case where I had to port a Cobol program for invoicing from a mini (Singer ?)
to Siemens 2002. There was not much fuzz logically, as the compilers were quite
compatible, seen from the outside.
What took me some days to find out, was that the program sometimes executed routines it
wasnt supposed to, e.g. housekeeping whilst in the middle of an invoicing routine. The
reason was, that some ALTER TO PROCEED TO were used, well documented etc., so that was not
the problem. The problem was, that when the system had to reload pages, it wouldnt reload
the swapped page, but the original, so my GOTO was ruined....
Needless to say, that the ALTERS were eliminated.
Nico