Type checking for MAGNITUDE causes the assembler to perform
magnitude validation of signed immediate-data fields of machine instruction operands.
To disable the checking, use the NOMAGNITUDE suboption.
For each violation, a warning message (severity 4) is
issued and object code is created.
For a 16-bit signed immediate-data field, the normal allowed range of values
is -32768 through to 32767.
For a 32-bit signed immediate-data field, the normal allowed range of values
is -2147483648 through to 2147483647.
Figure 1 shows the assembler behavior, with the
default of MAGNITUDE, which is to issue a warning message and to
generate the object code.
Figure 1. MAGNITUDE behavior
00000000 A72A 8000 00008000 12 AHI R2,32768
** ASMA320W Immediate field operand may have incorrect sign or magnitude
00000004 A72A 7FFF 00007FFF 13 AHI R2,32767
00000008 A72A 0001 00000001 14 AHI R2,1
0000000C A72A 0000 00000000 15 AHI R2,0
00000010 A72A FFFF FFFFFFFF 16 AHI R2,-1
00000014 A72A 8000 FFFF8000 17 AHI R2,-32768
00000018 A72A 7FFF FFFF7FFF 18 AHI R2,-32769
** ASMA320W Immediate field operand may have incorrect sign or magnitude
0000001C A72A FFFF 0000FFFF 19 AHI R2,X'FFFF'
** ASMA320W Immediate field operand may have incorrect sign or magnitude
Note: When generating object code, the assembler takes bits 16 to 31
of Addr2 for use as the immediate-data field. Bits 0 to 15
are ignored.
Figure 2 shows the assembler behavior, with
NOMAGNITUDE, which is to issue no messages and to generate the
object code.
Figure 2. NOMAGNITUDE behavior