On Fri, Dec 6, 2013 at 12:22 PM, Paul Gilmartin <[email protected]>wrote:
> This thread seems to nave diverged into ASSEMBLER-LIST and > IBM-MAIN. I'm extending the topic. A contributor said in > ASSEMBLER LIST: > > ... I am trying to decide to convert it to baseless or write an > assembler stub and redo the exit in C. > > In a perfect universe, a stub would be needless. > > About 40 years ago, before I had any OS/360 exposure, an Expert > boasted to me that the calling conventions of OS were absolutely > homogeneous -- a subroutine in any language could be called from > any other language, or as a main program alike. (I was skeptical -- > I asked, "LISP? SNOBOL4?" My mentor replied, "Of course!") > > What have we lost? > > With XA, the facility was mostly preserved: CSECTs were marked > AMODE 24 or AMODE 31; would be entered in the correct AMODE, > and would return to a caller in the caller's mode via BSM. > > So, daydream/wishlist item: It should be made possible to mark > a load module as LE-mode so ATTACH or an EXIT interface would > seamlessly enter an exit written in LE C (not just Metal C) and the > exit return smoothly. > ATTACH shouldn't need to know whether a module is LE or not. The way that a main program is bound results in the LE environment being initialized before the first user code. The problem with EXITs, especially OS type exits, is that LE might not be initialized. And initializing it is "expensive" because it sets up a lot of environmental stuff, such as a HEAP and a STACK. > > Would Metal C remove the need for an Assembler stub? > AFAIK, yes it removes the need for assembler because Metal C could also be called "non-LE C". I.e. the routines it generates do not depend on LE being initialized. Which is why it has restrictions on what it can do, compared to the "full C" compile. One other environment you did not mention was XP linkage, used by the C run time. It greatly changes the OS calling convention because it passes parameters in general and floating registers instead of via the parm list pointed to by GPR1. > > -- gil > > -- This is clearly another case of too many mad scientists, and not enough hunchbacks. Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
