IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

EX instruction in a reentrant program?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 11:32 am
Reply with quote

Is it permissible to use EX(execute) instruction in a program that is supposed to be re-entrant?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 12:29 pm
Reply with quote

From the POP :

The single instruction at the second-operand
address is modified by the contents of general
register Ri, and the resulting instruction, called
the target instruction, is executed.

When the Ri field is not zero, bits 8-15 of the
instruction designated by the second-operand
address are ORed with bits 56-63 of general register
Ri The ORing does not change either the
contents of general register Ri or the instruction in
storage, and it is effective only for the interpretation
of the instruction to be executed. When the
Ri field is zero, no ORing takes place.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jun 07, 2011 12:30 pm
Reply with quote

Nice to check, but what is your worry?
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 12:48 pm
Reply with quote

Bill Woodger wrote:
Nice to check, but what is your worry?


Out of curiosity.

EX does change the body of the program. If we are not permitted to amend local storage in a reentrant assembler program then we should not be allowed to use EX as well. That's what my logical feeling suggests.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jun 07, 2011 1:11 pm
Reply with quote

Are you not permitted to amend local storage, or are you not permitted to rely on any amendments to local storage?

Anyway, a digression there.

Although you effectively "amend" the instruction being executed, it will operate in the manner you intend (as long as you establish things correctly before issuing the EX) whether starting from a fresh copy of the module or from a previously-used module.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 07, 2011 1:12 pm
Reply with quote

reread Peter reply and amend Your feelings ( from logical to plain wrong )

EX does not change anything

and if You do not trust Peter cut and paste skills reread the same here
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DZ9ZR003/CCONTENTS?SHELF=DZ9ZBK03&DN=SA22-7832-03&DT=20040504121320
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 1:20 pm
Reply with quote

Enrico, thanks for the compliment regarding my cut/paste skills.

I could have said it in my own words, but why would i if its all there on the internets. If only people would take some pains to do some research
themselves.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 07, 2011 1:23 pm
Reply with quote

that' s also my point...
no need to rewrite what trained Information Developers have done in a ( usually ) better way icon_biggrin.gif
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 3:21 pm
Reply with quote

I tested it and the change is just temporary.

Earlier I did have a look at the manual, but somehow missed "..temporarily modify...". icon_sad.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 07, 2011 4:00 pm
Reply with quote

Quote:
I tested it and the change is just temporary.

horse manure... You still do not understand it do You ?
seem pretty clear
Quote:
When the Ri field is not zero, bits 8-15 of the instruction designated by the second-operand address are ORed with bits 56-63 of general register Ri
The ORing does not change either the contents of general register Ri or the instruction in storage,
and it is effective only for the interpretation of the instruction to be executed.
When the Ri field is zero, no ORing takes place.


if the EX instruction would change even if temporarily main storage
zillions of line of code residing in write protected storage would have never worked
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 4:31 pm
Reply with quote

enrico-sorichetti wrote:
horse manure... You still do not understand it do You ?


I do.
I am just referring to the explanation given in quick reference:
"The EXECUTE instruction executes the single instruction
at the second operand address, using the value in the
rightmost byte of the first operand register as a
modifier value. The 8 bits in the rightmost byte of
the first operand register are used to temporarily
modify
bits 8 through 16 of the executed instruction.
Depending on the instruction that is the target of
EXECUTE, this may be a length, a register number, or a
byte of immediate data. If the first operand specifies
R0, then the target instruction is executed, but no
temporary modification takes place. An EXECUTE
instruction cannot be the target of EXECUTE; a S0C3
ABEND will occur if this is attempted.
"
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 07, 2011 4:42 pm
Reply with quote

again I confirm ... Your understanding is wrong

again ( cut and paste from the POP )
Quote:
The single instruction at the second-operand address is modified by the contents of general register R1, and the resulting instruction, called the target instruction, is executed.
When the R1 field is not zero, bits 8-15 of the instruction designated by the second-operand address are ORed with bits 56-63 of general register R1.
The ORing does not change either the contents of general register R1 or the instruction in storage,
and it is effective only for the interpretation of the instruction to be executed. When the R1 field is zero, no ORing takes place.


what is that is not clear ?
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 4:51 pm
Reply with quote

enrico-sorichetti wrote:
what is that is not clear ?


Thanks for the information related to EX. I have no doubts with it now.

The thing is I have pasted a piece of information in my previous reply I get when I do a "QW EX" on my tso command line. The information in blue fonts in the previous reply is what pops up after that. My point is: "Is the information there(on mainframe QW) incomplete in a sense?"


I confirm again I have no doubts with EX anymore. icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 07, 2011 4:53 pm
Reply with quote

it would be nice that when somebody is told that he/she is wrong
he/she would not stand by his/her stubbornness an listen to people with much more experience

or at least if they do not want to believe people at least believe the IBM manuals
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 07, 2011 4:55 pm
Reply with quote

it is universally known that QW is too often wrong !
and must never be taken as a substitute for the official manuals and docs
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jun 07, 2011 5:04 pm
Reply with quote

Quote:
it is universally known that QW is too often wrong !
and must never be taken as a substitute for the official manuals and docs
enrico -- WIDELY known, but (obviously) not UNIVERSALLY known! icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 07, 2011 5:20 pm
Reply with quote

Ok, I sit corrected ( more comfortable than standing ) icon_biggrin.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 5:59 pm
Reply with quote

I expected after my response at least something like "peterholland, you are a wizard/genius. thanks a lot". Nothing like that. Im not sure if im going to support this TS in the future. icon_evil.gif
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 7:15 pm
Reply with quote

PeterHolland wrote:
I expected after my response at least something like "peterholland, you are a wizard/genius. thanks a lot". Nothing like that. Im not sure if im going to support this TS in the future. icon_evil.gif

thanks a lot peter! Sorry for the delay icon_smile.gif. I am away from my pc and writing thru a mobile device.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 10:43 pm
Reply with quote

Thats ok, one compliment i can live with.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top