Arthur T. wrote:
Well, that defeats one of my forced abend techniques:

  BRC cond,*+2

This branches into the middle of the BRC (Jump) instruction, which in this
case is always x'0001', resulting in an S0C1 abend.

SOC1s are too common to stand out.  I prefer
   EX R15,*    (Of course, it doesn't matter which register.)



Yes..

But EX xx,* does require a base register, whereas BRC COND,*+2 doesn't
(it's a relative instruction)

Furthermore, BRC has the advantage of only raising a program interrupt
if the condition is met (so it's a nice 'assert()' alternative).

BRC COND,*+3 would generate a nice specification exception - which is a
little less common than PIC 1, but the assembler would probably throw an
alignment warning there !

You may also, in this case do a BC COND,1 which would generate a
specification exception, requires no base register and also works
reliably without needing the Branch Relative Feature to be installed -
but still generates the unaligned warning in the assembler.. And
unfortunately, you also lose the instruction address instruction that
generated the problem.. come to think of it, it's a bad idea :P

--Ivan

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to