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

Reply via email to