🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #541

Re: Revenge

#541
From: a... Allan E Johannesen
Date: Fri, 22 Dec 1989 13:02
22 lines
1805 bytes
>>>>> On 20 Dec 89 18:23:00 GMT, Greg_d...@mts.rpi.edu (Commander Krugannal) said:

Moore>      One program segment I have never tried, but supposedly works
Moore>    on at least the IBM 3081D, is the statement BALR 12,12.
Moore>    This instructs the assember to branch to 12 and load the value
Moore>    of 12 and exucute it. Well, the command 12 is BALR, so this 
Moore>    essentially tells itself to BALR to itself, and excute what is
Moore>    there, which is a BALR and you get the picture. :-)

It's been 20 years since I've written assembler, but you've been led
astray.  Branch And Link Register (BALR) is intended to facilitate
subroutine calls; it loads the address of the next effective pc into
the first register and branches to the address contained in the second
register and

a) that pc will be the one following the BALR
b) the destination address may well have been computed before the pc
   being stored (I don't recall the order of address evaluation) and,
   even so,
c) the data being stored is a pc, not the BALR instruction itself and,
d) the 360/370/etc series has a separate accumulator and memory space,
   so one cannot branch to a register.
Technical Details
Message-ID: <6392@wpi.wpi.edu>
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!wuarchive!usc!snorkelwacker!spdcc!merk!xylogics!cloud9!jjmhome!m2c!wpi!aej
References: <11212.664.forumexp@mts.rpi.edu>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!wuarchive!usc!snorkelwacker!spdcc!merk!xylogics!cloud9!jjmhome!m2c!wpi!aej
From: a...@wpi.wpi.edu (Allan E Johannesen)
Newsgroups: alt.folklore.computers
Subject: Re: Revenge
Message-ID: <6392@wpi.wpi.edu>
Date: 22 Dec 89 13:02:36 GMT
References: <11212.664.forumexp@mts.rpi.edu>
Organization: Worcester Polytechnic Institute, Worcester, Mass.
Lines: 22
Posted: Fri Dec 22 14:02:36 1989
In-reply-to: Greg_d._Moore@mts.rpi.edu's message of 20 Dec 89 18:23:00 GMT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit