Sometimes R15 contains the entry point. 

If the routine receives control from ATTACHX or LINKX, for instance, and if it 
is to run in AMODE(64), then it does not. 

A better solution is to use 

LARL R12,PROGNAME
USING PROGNAME, R12

which has no dependency on R15.

Tom Harper
Phoenix Software International 

Sent from my iPhone

> On Sep 18, 2022, at 5:06 PM, Mike Schwab <mike.a.sch...@gmail.com> wrote:
> 
> When you enter a program, R15 points to the first byte of PROGNAME.
> You usually have a USING R15,PROGNAME.
> If you are going to be calling OS functions or programs, you will copy
> R15 to another register (often R12), issue a USING R12,PROGNAME and
> DROP R15,PROGNAME.  So when using a label within 4K of PROGNAME, the
> assembler will use the USING register, and compute the offset from
> PROGNAME.
> 
>> On Sun, Sep 18, 2022 at 8:12 AM Bob Bridges <robhbrid...@gmail.com> wrote:
>> 
>> Twenty years ago I wrote a few programs for Excel, and didn't see what all 
>> the fuss was about: "object-oriented" didn't seem very different from 
>> traditional programming that I'd been doing for 25 years.  (At the same time 
>> I was frequently infuriated at the message "...does not support this 
>> property or method", exactly because I ~didn't~ understand what was 
>> different about OO coding.)
>> 
>> Eventually a VBA programmer advised me a bit more, and I'm now an 
>> enthusiast, about OO at least.  Not so much about the Visual flavors of 
>> Basic itself, but it was my introduction to OO and it is at least available 
>> on all Windows machines and in all MS Office apps, which is handy.
>> 
>> What confuses me (so far) is the concept of addressability in HLASM.  Every 
>> time I make a stab at writing my first assembler program I get a little 
>> closer, but I'm still not there yet.  In other assemblers I got quite 
>> familiar with indirect and offset addressing - it isn't that - but what 
>> exactly happens with the USING instruction still eludes me.
>> 
>> ---
>> Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
>> 
>> /* Revenge can be bitter-sweet.  But if you sit back and watch, karma can be 
>> pure entertainment.  -found on Facebook 2015 */
>> 
>> -----Original Message-----
>> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
>> Tom Brennan
>> Sent: Sunday, September 18, 2022 00:59
>> 
>> As for programming, I seem to do better starting at the bottom, with 
>> instructions, registers, PSW bits and such, and moving up from there. Higher 
>> level languages and especially Object Oriented code tend to confuse me.
>> 
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 
> 
> 
> -- 
> Mike A Schwab, Springfield IL USA
> Where do Forest Rangers go to get away from it all?
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to