Why make coding in assembler so difficult. People already complain that it shouldn't be used because it's outdated and incomprehensible.
-----Original Message----- From: IBM Mainframe Assembler List [mailto:assembler-l...@listserv.uga.edu] On Behalf Of Paul Gilmartin Sent: Thursday, September 09, 2010 1:33 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Instruction Set Architecture (Subject: corrected) On 9/9/2010 12:14 AM, Fred van der Windt wrote: >> Once my erroneous comma is removed, you can walk a lot further. >> Read John Ehrman's article, as cited earlier by Michael Stack: >> >> http://www.kcats.org/csci/464/ho/usingtechnique.shtml > Not really. The offset will still and always allow you to walk 0-4095 bytes forward (from the base+index location). The original problem (and the examples in the link) just introduce an index register to offset the 4096 byte window relative to the base register. In a very obfuscated manner. I don't think anybody meant to say that an index register doesn't allow you to move the 'window of addressability' anywhere you want. > The USING statement always offsets the window. What makes one USING and implied address reference more obfuscated than another? > The linked article already said it: "The point of these examples is not to recommend a particular practice, only to show how the assembler does its work; I hope they helped". I would 'gently correct' developers that dream up a code sequences like these in our shop. > I would firmly oppose such a gentle correction. Take a broad view. Which has the more obvious meaning: LA R3,-4(R2) Set R3 to 4 less than R2 or: LA R3,4092(R1,R2) Set R3 to 4 less than R2 ? The first hardly needs the comment to show the programmer's intention, and the assembler's checking of addressability window makes it less error prone. -- gil ========================== This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.