It seems I've touched off another little fire-storm :-) > And a corollary would be "why DID IBM make it so darned hard to write > reentrant assembler code?"
Umm... because they really weren't thinking about the problem. Back in the day things were considerably simpler and there was really no need for a more elaborate run time environment, or so they thought. As time passed, things became more complex (of course) but by then the horse had already bolted with respect to the classic techniques (list form macro expansions etc.) used by assembly language programmers. As Ed Jaffe pointed out it would be impossible to go and change all of those dependencies so the only alternative would be to deliver new functions that don't fall prey to the same problems. And of course, as long as the old style of programming is what is taught by default, nothing will ever significantly change. On other platforms, the "run time environment" is embedded in the fabric of the system. Reentrancy (or whichever similar term floats your boat) is the only way that exists and so people don't even give it a moment's thought. It just works that way. Your working storage is allocated automatically from the stack and for data that needs to have a separate lifetime than your function, malloc() is a fast sub-allocation from the heap. GETMAIN is conservatively 4 orders of magnitude slower, so it is trivial for compiled code running on a runtime to blow the doors off assembler code. In z/OS and ancestors, the run time environment has always been this grafted on chunk of mindless gooberware (LE) that has more controls than a nuclear reactor. To this day it is treated as a separate thing that exists to serve those HLL weenies, rather than just being taken for granted by everyone. But even with all of its faults, it is better than the "nothing" that assembler developers assume. It is possible (BTDTGTS) to build coding and run time environments on z/OS where the programmer (even the system's software developer) never has to confront the low level details. In such an environment, reentrancy is natural and in all but the most trivial cases, blows the doors off more "traditional" programming practices for performance. This is of course, a religious argument to many. I don't expect to change any minds. But I offer the following challenge to assembly language application developers. Even though LE is a demented rats-nest of bad ideas, if you simply use it, you might be pleasantly surprised at how much easier and faster your code can run overall. There's a lot more function available and it is trivially easy to use. And if you did it on another platform, you wouldn't even be having this discussion at all. This is one of those areas where z/OS is truly a stone-age operating system. CC ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html