Hi Bob,

I think about a USING statement as a "promise" that a register will contain
an appropriate address at runtime. The statement:

        USING  MyArea,R9

means (to me): I promise that at runtime register 9 will contain the
address of an area that is mapped (described) by the DSECT called MyArea.
This just tells the assembler to use register 9 as a base register for
instructions addressing anything in MyArea. In other words, MyArea should
be at offset 0 at runtime.

Hope that makes some sense.

Regards,
Peter



On Sun, 18 Sept 2022 at 23:12, 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
>

----------------------------------------------------------------------
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