The HLASM addressability logic for 12-bit displacements divides
the displacement from the USING base by 4096 and then looks in
the data area representing the USING statement to see if that
base register slot has a register number 0 to 15 (or a dummy
value greater than 15 indicating no register).  Unfortunately,
it does not check for whether the result of that division was
more than 15, as it was in this case, causing it to look beyond
the end of the USING statement and picking up an irrelevant byte
(containing zero in this example) as a base register!

So this problem may occur if an instruction with a 12-bit
displacement attempts to reference a field with an offset of
more than 65535 bytes (hex FFFF) from the first base register.

This point in the code is not reached if the default end limit
is used, with an offset of 4096 times the number of base
registers, because any address higher than the end limit will be
considered out of range before checking for a base register.

So now we know how to fix it too, but, as previously mentioned,
we can give that more priority if we receive a support case.

Jonathan Scott, HLASM
IBM Hursley, UK

Reply via email to