From: "McKown, John" <john.mck...@healthmarkets.com> Sent: Tuesday, 28 August 2012 1:34 AM
Destroys the contents of R15, so I guess I would load R15 into, say, R0 and do the OR operation on R0. However, I'm on a z9 and will likely never be on anything more advanced. So I'll need to load the mask into another register, say R1. That would either require an L R1,variable or literal (=X'FFFFFFFC'), or do an: AHI R1,X'04' followed by an LCR R1,R1. I don't know which of those is "better". I guess the Load would be more easily understood by even a novice. LR R0,R15 L R1,=A(-4) OR R0,R1 CR R0,R1 JNE BAD_RC
Simpler is: SLL 15,30 LTR 15,15 BNZ ... or, if worried about preserving R15 LR 0,15 SLL 0,30 LTR 0,0 BNZ ...