On Sat, Sep 17, 2022 at 10:29 AM Ed Jaffe <edja...@phoenixsoftware.com>
wrote:

> On 9/17/2022 2:06 AM, Abe Kornelis wrote:
> > Starting with reentrant programming seems a pretty tough call.
>
> Not sure why re-entrant programming should be considered heavy lifting.
> Would not any assembler course teach about USING?
>

For me, the biggest problem in making something reentrant is if I need to
use a DCB. There is no way, that I know of, to generate a DCB in a
GETMAIN'd area. For ACB, there is a GENACB. Too bad z/OS cannot access
non-VSAM datasets using an ACB. From what I've read, z/VSE can in some
instances. I now like to write "pure" code. That is, code which does not
modify anything in the CSECT. All modifiable data is in GETMAIN'd
storage (OK, actually I use STORAGE OBTAIN in HLASM).



>
> A typical non-reentrant program has a single code/data segment and a
> single USING.
>
> A typical reentrant program has two segments: one for code and one for
> data -- each with its own USING. This has been common practice on other
> platforms (e.g., Intel) for decades.
>
> If I were to teach an HLASM course, I can envisage my very first
> recommended program organization diagram showing both a code and a data
> segment and never once suggesting at any time during the class that code
> and data can be (or ever historically were) mixed. Example:
>
> | R12 -> .---------.    R13 -> .---------.
> |        |         |           |         |
> |        |  Code   |           |  Data   |
> |        | Segment |           | Segment |
> |        |         |           |         |
> |        '---------'           '---------'
>
> > Baseless should - I guess - pose less of a challenge.
>
> Agreed. I would not make mention of based branches until the more
> advanced portions of the class.
>
>
> --
> Phoenix Software International
> Edward E. Jaffe
> 831 Parkview Drive North
> El Segundo, CA 90245
> https://www.phoenixsoftware.com/
>
>

Reply via email to