Tom Schmidt wrote:

On Fri, 29 Jul 2005 15:25:49 -0700, Edward E. Jaffe wrote:
...snipped...
For example, ,'BC 15,0(0,0)' will definitely go to location zero and
leave no linkage trail in a register. How would you even code (on
purpose or by accident) a BRC or BRCL to branch to location zero?

Here's a manufactured relative branch to low storage (I might miss
location 0 but I'll scare it from above at least).

So how about:
  LA     R15,LOWRENT+L'LOWRENT  Beyond jump instruction's address
  SRL    R15,1        Compute number of halfwords to zero
  LNR    R15,R15      zero is a "backwards jump"
  STCM   R15,B'1111',LOWRENT+2  Alter relative address in instr.
LOWRENT BRCL  15,0      Go fly off to (very) low storage (modified)

(Granted it may not be exactly zero but the idea s.b. clear now.)
That won't necessarily get you there in Amode 64 but will in 24 or 31 bit
mode.

I think our "wires" got crossed somewhere...

I never suggested it was *impossible* to branch into PSA using a long relative branch. Obviously, if one branches into data or constants anything is possible. I simply pointed out that it's not possible to code such a branch in an assembler program. (Your pathological relative branch scenarios involving EXecute and/or self-modifying code help illustrate that point quite well.)

In other words, I never meant to imply one couldn't write code to *construct* a relative branch that goes to location zero. What I meant was that you couldn't assemble one in your program. Specifically, 'J 0' is totally invalid (will not assemble) whereas 'B 0' does exactly what you think it does -- branches to location zero. More to the point, 'J XXX' can *never* be "wild" whereas 'B XXX' can be "wild" any time the base register becomes corrupted or the USING is coded improperly.

I have long considered relative branches to be part of the solution .. not part of the problem.

--
-----------------------------------------------------------------
| Edward E. Jaffe                |                                |
| Mgr, Research & Development    | [EMAIL PROTECTED]    |
| Phoenix Software International | Tel: (310) 338-0400 x318       |
| 5200 W Century Blvd, Suite 800 | Fax: (310) 338-0801            |
| Los Angeles, CA 90045          | http://www.phoenixsoftware.com |
-----------------------------------------------------------------

----------------------------------------------------------------------
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