Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Tony Harminc
On 28 June 2018 at 16:23, Phil Smith III  wrote:
...
> I like the idea of PROTECT/UNPROT instructions*. Seems like the cleanest way 
> to do it to me.
...
> *I wasn't sure of the right term for "a thing that the assembler looks at but 
> doesn't actually generate code"; Google found me IBM pages that refer to 
> USING as an "instruction", so I would take PROTECT/UNPROT to be in the same 
> category. Happy to be corrected, as ever.

The HLASM Language Reference differentiates "Machine instruction
statements" from "Assembler instruction statements". Roughly, the
former generate machine code and the latter don't. The line is pretty
clear, but there are one or two fuzzy areas. For example, CNOP is an
Assembler instruction statement, but it can generate code. CCW/CCW1
are also Assembler instruction statements that generate code; albeit
not zArch code. And of course PUNCH and REPRO can put code into the
object stream, but no one would call them Machine instruction
statements.

Tony H.


Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Phil Smith III
Hobart Spitz wrote:
>I went to Cornell, where PL/C was developed.  In my freshman class, anyone
>who already knew a programming language (I knew 3 then) was given work in
>PL/1 (as then called), using PL/C, instead of in FORTRAN.  I think we were
>one of the first classes, if not the very first, to beta test it.  Being
>skeptical of compiler output has been a helpful skill ever since.

>Where did you use PL/C?

PL/C was a one-step version of PL/I (note that the short name is officially 
"PL/I", not "PL/1", even though the full name is "Programming Language/One"; go 
figure): no compile/link/run, just "compile".

This was at University of Waterloo. My dad ran the Arts Computing Office, which 
was what it sounded like: a small computing centre (Canadian spelling!) for 
Arts students, so they didn't have to brave the CS types in the Math building. 
I remember that PL/C was from Cornell, now that you mention it; he had lots of 
contacts there. His research was working on concordances of scholarly works 
(first on OS/360, then on VM, then after he retired, on his PC) and we made 
many trips there for him to work with his colleagues.

At the time, the ACO had a Xerox 530, which they'd bought because the price was 
right and Xerox was saying "Hey, we're Xerox, we won't abandon you". Of course 
a couple of years later they said "Never mind, we're out of the midrange 
business". Then a decade or so later they started selling PCs, with the slogan 
"We're Xerox, we won't abandon you". He laughed and laughed.

Anyway, it was a big deal for me to have a chance to program at the age of 
14--nowadays, of course, that's starting late!

...phsiii


Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Hobart Spitz
Phil.

I went to Cornell, where PL/C was developed.  In my freshman class, anyone
who already knew a programming language (I knew 3 then) was given work in
PL/1 (as then called), using PL/C, instead of in FORTRAN.  I think we were
one of the first classes, if not the very first, to beta test it.  Being
skeptical of compiler output has been a helpful skill ever since.

Where did you use PL/C?


OREXXMan
JCL is the buggy whip of 21st century computing.  Stabilize it.
Put Pipelines in the z/OS base.  Would you rather process data one
character at a time (Unix/C style), or one record at a time?
IBM has been looking for an HLL for program products; REXX is that language.

On Thu, Jun 28, 2018 at 4:23 PM, Phil Smith III  wrote:

> Hobart Spitz wrote:
> >the latter..., or something even milder, I just don't know what.  Getting
> >into the habit of ignoring warnings is not a great idea, and it means
> >questions for the next person that has to look at your code.
>
> Thanks for taking my point as intended, sir. Always risky these days...!
>
> Absolutely, ignoring warnings is a Very Bad Habit. My first official
> (computing) language was PL/I (well, PL/C): I sat in on my dad's university
> course the summer of 1975, after my 8th grade. He taught me to examine and
> hopefully eliminate any warnings. At the time, I thought PL/I was anal
> about such things; now that I have to deal with C, I long for PL/I. I feel
> like in C there are lots of warnings that "everybody ignores" (often by
> telling the compiler not to issue them), whereas in PL/I I don't recall
> being unable to eliminate every one of them legitimately.
>
> I like the idea of PROTECT/UNPROT instructions*. Seems like the cleanest
> way to do it to me.
>
> So, we'll have this later this year, right? :)
>
> ...phsiii
>
> *I wasn't sure of the right term for "a thing that the assembler looks at
> but doesn't actually generate code"; Google found me IBM pages that refer
> to USING as an "instruction", so I would take PROTECT/UNPROT to be in the
> same category. Happy to be corrected, as ever.
>


Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Phil Smith III
Hobart Spitz wrote:
>the latter..., or something even milder, I just don't know what.  Getting
>into the habit of ignoring warnings is not a great idea, and it means
>questions for the next person that has to look at your code.

Thanks for taking my point as intended, sir. Always risky these days...!

Absolutely, ignoring warnings is a Very Bad Habit. My first official 
(computing) language was PL/I (well, PL/C): I sat in on my dad's university 
course the summer of 1975, after my 8th grade. He taught me to examine and 
hopefully eliminate any warnings. At the time, I thought PL/I was anal about 
such things; now that I have to deal with C, I long for PL/I. I feel like in C 
there are lots of warnings that "everybody ignores" (often by telling the 
compiler not to issue them), whereas in PL/I I don't recall being unable to 
eliminate every one of them legitimately.

I like the idea of PROTECT/UNPROT instructions*. Seems like the cleanest way to 
do it to me.

So, we'll have this later this year, right? :)

...phsiii

*I wasn't sure of the right term for "a thing that the assembler looks at but 
doesn't actually generate code"; Google found me IBM pages that refer to USING 
as an "instruction", so I would take PROTECT/UNPROT to be in the same category. 
Happy to be corrected, as ever.


Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Hobart Spitz
Phil,

> Seriously, not picking a fight, just don't understand whether you're
saying "This doesn't work because" or "Note that in cases like this,
there'd be some tinkering"?

the latter..., or something even milder, I just don't know what.  Getting
into the habit of ignoring warnings is not a great idea, and it means
questions for the next person that has to look at your code.

I like the general idea.  AKAIK, there is an EQU feature that checks that
you are using the right size register (32 or 64 bit) with the right
instruction.  Perhaps something similar would do the trick.

Or maybe just a macro, like:

  macro

lbase  ,   Load a USING base reg

  unprot 

l  ,

  protect 

  mend



OREXXMan
JCL is the buggy whip of 21st century computing.  Stabilize it.
Put Pipelines in the z/OS base.  Would you rather process data one
character at a time (Unix/C style), or one record at a time?
IBM has been looking for an HLL for program products; REXX is that language.

On Thu, Jun 28, 2018 at 10:22 AM, Phil Smith III  wrote:

> Hobart Spitz wrote:
> >If you are traversing a linked-list of control blocks (e.g.), you might
> >validly modify a USING register that points to a DSECT of that control
> >block.
>
> Sure, but...so? You'd explicitly unprotect, change, reprotect. That's the
> whole point. (Or not protect at all; this is optional, after all.)
>
> Seriously, not picking a fight, just don't understand whether you're
> saying "This doesn't work because" or "Note that in cases like this,
> there'd be some tinkering"?
>


Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Paul Gilmartin
On 2018-06-28, at 09:23:11, Charles Mills wrote:

> FWIW, I see things the same as Phil. Either unprotect the register before 
> bumping it, or don't use the feature, or potentially ignore the warning.
>  
Tricky if one must use DROP to unprotect.  In Hobart's case the
register being updated is the base register.


> Hobart Spitz wrote:
>> If you are traversing a linked-list of control blocks (e.g.), you might
>> validly modify a USING register that points to a DSECT of that control
>> block.

-- gil


Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Charles Mills
FWIW, I see things the same as Phil. Either unprotect the register before 
bumping it, or don't use the feature, or potentially ignore the warning.

Charles


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Phil Smith III
Sent: Thursday, June 28, 2018 7:23 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: An idea I got when researching a bug - warnings when a specific 
register is changed

Hobart Spitz wrote:
>If you are traversing a linked-list of control blocks (e.g.), you might
>validly modify a USING register that points to a DSECT of that control
>block.

Sure, but...so? You'd explicitly unprotect, change, reprotect. That's the whole 
point. (Or not protect at all; this is optional, after all.)

Seriously, not picking a fight, just don't understand whether you're saying 
"This doesn't work because" or "Note that in cases like this, there'd be some 
tinkering"?


Re: An idea I got when researching a bug - warnings when a specific register is changed

2018-06-28 Thread Phil Smith III
Hobart Spitz wrote:
>If you are traversing a linked-list of control blocks (e.g.), you might
>validly modify a USING register that points to a DSECT of that control
>block.

Sure, but...so? You'd explicitly unprotect, change, reprotect. That's the whole 
point. (Or not protect at all; this is optional, after all.)

Seriously, not picking a fight, just don't understand whether you're saying 
"This doesn't work because" or "Note that in cases like this, there'd be some 
tinkering"?