On Thu, 23 Oct 2025 at 19:47, Charles Mills <[email protected]> wrote:
> Really? That's unfortunate. A fairly C/C++ construct is something like > > If (mypointer <> nullptr) mypointer->foo = myvalue; > > Translating to assembler, that would be more or less > > LTR Rx,Rx > JZ *+8 > MVI FOO(Rx),MYVALUE > > I guess you can't make that into a STOC. Unfortunate. > IBM might suggest Load and Trap or one of its variations for this situation. While it clearly doesn't cover all possibilities, it's a match for some common ones. Tony H. -----Original Message----- > From: IBM Mainframe Assembler List <[email protected]> On > Behalf Of Ngan, Robert > Sent: Thursday, October 23, 2025 4:01 PM > To: [email protected] > Subject: Re: LOAD ON CONDITION > > They are very useful for avoiding branches. > However, the STORE ON CONDITION is a PITA, as it may update (and backout?) > the target field even if the condition is not matched. So don't use > STOC/STOCG unless you know you have write access to the target field. > This means you cannot load and test a pointer value, and do a STOCNZ to the > pointer location as that will generate a S0C4 for storing to address zero > even though STOCNZ should never do the store. > > Robert Ngan > DXC Luxoft > > -----Original Message----- > From: IBM Mainframe Assembler List <[email protected]> On > Behalf Of Phil Smith III > Sent: Thursday, October 23, 2025 16:26 > To: [email protected] > Subject: Re: LOAD ON CONDITION > > Jeebus. Assembler instructions should be able to fit on a licens plate!!! > > -----Original Message----- > From: IBM Mainframe Assembler List <[email protected]> On > Behalf Of Ed Jaffe > Sent: Thursday, October 23, 2025 4:28 PM > To: [email protected] > Subject: LOAD ON CONDITION > > I just coded this and it was kinda fun: > > LOCGHINP R6,1 Set to 1 if not positive > > -- > Phoenix Software International > Edward E. Jaffe > 831 Parkview Drive North > El Segundo, CA 90245 > https://www.phoenixsoftware.com/ > > > > ---------------------------------------------------------------------------- > ---- > This e-mail message, including any attachments, appended messages and the > information contained therein, is for the sole use of the intended > recipient(s). If you are not an intended recipient or have otherwise > received this email message in error, any use, dissemination, distribution, > review, storage or copying of this e-mail message and the information > contained therein is strictly prohibited. If you are not an intended > recipient, please contact the sender by reply e-mail and destroy all copies > of this email message and do not otherwise utilize or retain this email > message or any or all of the information contained therein. Although this > email message and any attachments or appended messages are believed to be > free of any virus or other defect that might affect any computer system > into > which it is received and opened, it is the responsibility of the recipient > to ensure that it is virus free and no responsibility is accepted by the > sender for any loss or damage arising in any way from its opening or use. >
