Placeholder Instruction

15 views
Skip to first unread message

Dave Clark

unread,
Sep 25, 2023, 4:33:04 PM9/25/23
to ASSEMBL...@listserv.uga.edu
In COBOL, an EVALUATE-WHEN-END-EVALUATE construct can use the
CONTINUE verb as a placeholder where you would normally need an imperative
statement. Well, in ASSEMBLER I have a SELECT-WHEN-ENDSL construct in
which I now need the same kind of placeholder instruction. In storage I
have used CNOP for alignment purposes but I don't think that is what I
want in this case. I know there are a number of instructions (compare,
branch, etc) that CAN be used as such a placeholder but the manual says
these are not the best way to do that kind of thing. But it doesn't say
what IS the best way to do this and I don't see a NOP or NOOP -- as I
would expect. What am I missing?!?

Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331



*********************************************************************************************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.
*********************************************************************************************

Paul Gilmartin

unread,
Sep 25, 2023, 4:44:14 PM9/25/23
to ASSEMBL...@listserv.uga.edu
On 9/25/23 14:32:57, Dave Clark wrote:
> In COBOL, an EVALUATE-WHEN-END-EVALUATE construct can use the
> CONTINUE verb as a placeholder where you would normally need an imperative
> statement. Well, in ASSEMBLER I have a SELECT-WHEN-ENDSL construct in
> which I now need the same kind of placeholder instruction. In storage I
> have used CNOP for alignment purposes but I don't think that is what I
> want in this case. I know there are a number of instructions (compare,
> branch, etc) that CAN be used as such a placeholder but the manual says
> these are not the best way to do that kind of thing. But it doesn't say
> what IS the best way to do this and I don't see a NOP or NOOP -- as I
> would expect. What am I missing?!?
>

What do you need other than one of:
BCR 0,0
DS 0H
???

--
gil

Dave Clark

unread,
Sep 25, 2023, 4:49:27 PM9/25/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
09/25/2023 04:44:08 PM:
> What do you need other than one of:
> BCR 0,0
> DS 0H
> ???


I found what I wanted in a different manual. I'm using NOPR 0 for
this.

Binyamin Dissen

unread,
Sep 25, 2023, 5:55:29 PM9/25/23
to ASSEMBL...@listserv.uga.edu
On Mon, 25 Sep 2023 16:32:57 -0400 Dave Clark <dlc...@WINSUPPLYINC.COM>
wrote:

:> In COBOL, an EVALUATE-WHEN-END-EVALUATE construct can use the
:>CONTINUE verb as a placeholder where you would normally need an imperative
:>statement. Well, in ASSEMBLER I have a SELECT-WHEN-ENDSL construct in
:>which I now need the same kind of placeholder instruction. In storage I
:>have used CNOP for alignment purposes but I don't think that is what I
:>want in this case. I know there are a number of instructions (compare,
:>branch, etc) that CAN be used as such a placeholder but the manual says
:>these are not the best way to do that kind of thing. But it doesn't say
:>what IS the best way to do this and I don't see a NOP or NOOP -- as I
:>would expect. What am I missing?!?

Just put another WHEN right after it.


SELECT
WHEN 1
something
WHEN 2
WHEN 3
something
ENDSEL ,

No need for a placeholder instruction.

--
Binyamin Dissen <bdi...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

Rene BRANDT

unread,
Sep 26, 2023, 1:42:53 AM9/26/23
to ASSEMBL...@listserv.uga.edu
hi,

It's not the same between these 2 :

WHEN 2
CONTINUE
WHEN 3
...
in this case CONTINUE is a BRANCH to END-EVALUATE

and
WHEN 2
WHEN 3
in this case WHEN 2 execute the same instruction as WHEN 3

HTH

Binyamin Dissen

unread,
Sep 26, 2023, 2:00:56 AM9/26/23
to ASSEMBL...@listserv.uga.edu
The macro does not know if there are any instructions in between.

You are describing

WHEN (2,3)

On Tue, 26 Sep 2023 05:42:27 +0000 Rene BRANDT
<000014a2846c666...@LISTSERV.UGA.EDU> wrote:

:> hi,

Dave Clark

unread,
Sep 26, 2023, 9:27:21 AM9/26/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
09/25/2023 05:55:23 PM:
> Just put another WHEN right after it.
>
>
> SELECT
> WHEN 1
> something
> WHEN 2
> WHEN 3
> something
> ENDSEL ,
>
> No need for a placeholder instruction.


Thanks. Yes, that would work but I don't like how it looks.
Because, to a COBOL programmer, it looks like an OR condition as it is in
COBOL. I wanted the placeholder instruction so that even a COBOL
programmer won't mistake the intent.


Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331



>
> --
> Binyamin Dissen <bdi...@dissensoftware.com>
> https://urldefense.com/v3/__http://www.dissensoftware.com__;!!
> E0nbmg29qrX0lQ!
>
a5fMeZw5lZjgqOCH9F55Qn08KurStICbXuMtntGXO9aCBKkuhZBcu3U9_fYRrKVMfABUipHum_3Z93UQdqBllxMMtg
> $
>
> Director, Dissen Software, Bar & Grill - Israel


Paul Gilmartin

unread,
Sep 26, 2023, 9:54:50 AM9/26/23
to ASSEMBL...@listserv.uga.edu
On 9/26/23 07:26:18, Dave Clark wrote:
> "IBM Mainframe Assembler List" wrote on
> 09/25/2023 05:55:23 PM:
>> Just put another WHEN right after it.
>>
>> SELECT
>> WHEN 1
>> something
>> WHEN 2
>> WHEN 3
>> something
>> ENDSEL ,
>>
>> No need for a placeholder instruction.
>
> Thanks. Yes, that would work but I don't like how it looks.
> Because, to a COBOL programmer, it looks like an OR condition as it is in
> COBOL. I wanted the placeholder instruction so that even a COBOL
> programmer won't mistake the intent.

Would Assembler accept "WHEN 3 AND NOT 2"?

Various programming languages have different semantics
for constructs that appear similar. For example:
CONTINUE in FORTRAN is quite different from
continue in C.

It wold be futile to attempt to write a C program with
semantics of a FORTRAN program. It's futile to write
an Assembler program which would work if it were COBOL.

Do you have a distaste for comments? Comments are your
friend. Add a comment explaining what you're doing.

--
gil

Dave Clark

unread,
Sep 26, 2023, 10:00:10 AM9/26/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
09/26/2023 09:54:44 AM:
> Do you have a distaste for comments? Comments are your
> friend. Add a comment explaining what you're doing.


No, I do not have a distaste for comments. I like comments. I
just prefer the look of the following over the alternative. (This is my
current code for a 3270 channel appendage routine as previously discussed
-- however, this is still not giving me the results I am looking for,
which is a true wait for a 3270 attention interrupt.)

ST R6,SUPVR6 SAVE SUPVR. WORK REG.
XR R6,R6 CLEAR WORK REGISTER
ICM R6,B'0111',X'41'(R0) GET PENDING CCW ADDR.
SELECT SELECT CONDITION
WHEN x'44'(R0),(ON,TM),x'80' WHEN INTERRUPT IS ATTN
MVC x'44'(2,R0),=x'0C00' SET CE+DE AND DEQUE
WHEN X'44'(R0),EQ,X'08' WHEN INTERRUPT IS CH END
NOPR 0 DO NOTHING AND DEQUE <===
WHEN X'44'(R0),EQ,X'04',AND, WHEN INTERRUPT IS DEVEND *
R6,(Z,LTR),R6 AND NO PENDING CCW
MVC x'44'(2,R0),=x'0600' SET DE+UC AND DEQUE
WHEN x'44'(R0),EQ,x'0C',AND, WHEN INTERRUPT IS CE+DE *
R6,(Z,LTR),R6 AND NO PENDING CCW
MVC x'44'(2,R0),=x'0F00' SET CE+DE+UC+UE AND DEQUE
WHEN OTHER WITH PENDING CCW
SL R6,=F'8' GET PREV. CCW ADDR.
IF 0(R6),EQ,x'03' IF CCW IS MY NOOP
IF 0(R1),(NOT,TM),x'80' IF CCB NOT FLAGGED
MVC x'44'(2,R0),=x'0080' CHANGE TO PCI
OI 0(R1),x'80' FLAG THE CCB
L R6,SUPVR6 RESTORE SUPVR. WORK REG.
B 0(,R7) REQUEUE AND RETRY
ENDIF ENDIF
NI 0(R1),x'FF'-x'80' REMOVE CCB FLAG
ENDIF ENDIF
ENDSL END SELECT
L R6,SUPVR6 RESTORE SUPVR. WORK REG.
B 4(,R7) DEQUEUE AND CONTINUE


Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331





Martin Ward

unread,
Sep 26, 2023, 10:21:43 AM9/26/23
to ASSEMBL...@listserv.uga.edu
On 26/09/2023 14:54, Paul Gilmartin wrote:
> It wold be futile to attempt to write a C program with
> semantics of a FORTRAN program.  It's futile to write
> an Assembler program which would work if it were COBOL.

Polyglot would beg to differ: https://ideology.com.au/polyglot/

:-)

--
Martin

Dr Martin Ward | Email: mar...@gkc.org.uk | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4

Kerry Liles

unread,
Sep 26, 2023, 10:59:05 AM9/26/23
to ASSEMBL...@listserv.uga.edu
Martin, thanks for posting that interesting link to polyglot!

Kerry Liles

Paul Gilmartin

unread,
Sep 26, 2023, 2:16:12 PM9/26/23
to ASSEMBL...@listserv.uga.edu
On 9/26/23 08:21:32, Martin Ward wrote:
> On 26/09/2023 14:54, Paul Gilmartin wrote:
>> It wold be futile to attempt to write a C program with
>> semantics of a FORTRAN program.  It's futile to write
>> an Assembler program which would work if it were COBOL.
>
> Polyglot would beg to differ: https://ideology.com.au/polyglot/
>
But it doesn't mention Assembler (or Rexx.)

ANOP would be a good placeholder candidate except for the
requirement for a sequence symbol.
Would it be a good Idea to make the sequence symbol optional?
Would that compromise error reporting?

Would it be a good Idea to allow CNOP 0,1?
Would that compromise error reporting?

Or just define an instream null macro.

--
gil

Juan Escamilla

unread,
Sep 26, 2023, 5:09:21 PM9/26/23
to ASSEMBL...@listserv.uga.edu
unsubscribe

Sincerely,
Juan C Escamilla

Juan C. Escamilla
Senior Mainframe Architect
Mainframe Platform
GM Global Technical Center
Michigan IT Innovation Center
Cadillac Bldg
7015 Edward Cole Blvd.
Warren, Michigan 48093-2350 USA
T. 586.986.2341
juan.es...@gm.com




-----Original Message-----
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> On Behalf Of Dave Clark
Sent: Tuesday, September 26, 2023 9:26 AM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: [EXTERNAL] Re: Placeholder Instruction

ATTENTION: This email originated from outside of GM.
Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.

Paul Gilmartin

unread,
Sep 26, 2023, 5:24:18 PM9/26/23
to ASSEMBL...@listserv.uga.edu
On 9/26/23 15:09:11, Juan Escamilla wrote:
> unsubscribe
>
"<mailto:LIST...@LISTSERV.UGA.EDU?subject=Info&body=INFO%20ASSEMBLER-LIST%0D%0AThanks%0D%0A>"

--
gil

Binyamin Dissen

unread,
Sep 27, 2023, 8:38:22 AM9/27/23
to ASSEMBL...@listserv.uga.edu
So put a comment statement

* CONTINUE

Or make a CONTINUE macro

MACRO ,
CONTINUE ,
MEND ,

On Tue, 26 Sep 2023 09:26:18 -0400 Dave Clark <dlc...@WINSUPPLYINC.COM>
wrote:

:>"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
:>09/25/2023 05:55:23 PM:
:>> Just put another WHEN right after it.
:>>
:>>
:>> SELECT
:>> WHEN 1
:>> something
:>> WHEN 2
:>> WHEN 3
:>> something
:>> ENDSEL ,
:>>
:>> No need for a placeholder instruction.
:>
:>
:> Thanks. Yes, that would work but I don't like how it looks.
:>Because, to a COBOL programmer, it looks like an OR condition as it is in
:>COBOL. I wanted the placeholder instruction so that even a COBOL
:>programmer won't mistake the intent.
:>
:>
:>Sincerely,
:>
:>Dave Clark

--
Reply all
Reply to author
Forward
0 new messages