Without looking at the PoOp, doesn't CC=1 indicate that the search has
failed so far, but that more length remains in the register pair, so you
should branch back and keep trying? A number of instructions are
interruptible and work that way.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Grinsell, Don
Sent: Friday, January 5, 2018 1:12 PM
To: [email protected]
Subject: SRST Question

Has anybody played with the SRST instruction?  I am confused by the examples
in the PoP.  Why do they branch back to the SRST instruction when the string
is found, e.g. BC 1,LOOP1?  Shouldn't the branch be to the FOUND label, e.g.
BC 1,FOUND?

      L 5,STRAADR
      L 4,STRALEN
      AR 4,5
      LA 0,X'C1'
LOOP1 SRST 4,5
      BC 1,LOOP1
      BC 2,NOTFND
FOUND [Any instruction]
...
NOTFND [Any instruction]

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to