You didn't mention the rule about using 0 (or R0) as a base register value, either explicitly or by default in your list of rules for LA ;-) That was the form I used. Only the increment value is loaded in that case, so you are restricted to loading a value of 0-4095.
When I was writing a lot of assembler programs there weren't as many rules, i.e. no 64-bit considerations, and they were second nature to me. Regards, Richard Schuh > -----Original Message----- > From: The IBM z/VM Operating System > [mailto:[EMAIL PROTECTED] On Behalf Of Alan Altmark > Sent: Friday, August 01, 2008 9:06 AM > To: [email protected] > Subject: Re: Missing the "nonames" option on SFS commands > > > Using LOAD ADDRESS requires that you learn all the little rules > - The operand has to be 0-4095 (it's a displacement) > - The maximum value of the register isn't what you think it is > - That maximum value is different in AMODE 24 than it is in AMODE 31 > - There's no overflow protection with LA R1,10(,R1) since it > isn't an arithmetic operation > - Don't forget the comma in (,R1) > > If you could live with it, no problem, but it wasn't for the > uninitiated. > That's the nice thing about LHI, it was designed to load a > number into a register, not an address. > > Now if you want to increment a register by 10: > AHI R1,10 > > Just hoping folks learned something new today. I'll be the > first to admit that these new (NOT!) instructions don't come > naturally to my fingertips. > > Alan Altmark > z/VM Development > IBM Endicott >
