We decided to replace many SS instructions with their SIL counterparts.
One common case is frustrating.
D501 C01E C020 CLC HWord,=H'-1' Is it negative one?
A784 000C JE NegOne Branch if yes
replaced with:
E555 C01E FFFF CLHHSI HWord,-1 Is it negative one?
A784 000C JE NegOne Branch if yes
** ASMA320W Immediate field operand may have incorrect sign or magnitude
- -1
I totally understand the warning in this case:
E555 C01E FFFF CLHHSI HWord,131071 Is it negative one?
A784 000C JE NegOne Branch if yes
** ASMA320W Immediate field operand may have incorrect sign or magnitude
- 131071
but I can't understand why -1 generates this warning. The provided value
is validly within the range -32768 through 32767.
We like TYPECHECK(MAGNITUDE) and quite literally assemble tens of
millions of lines of code daily with it enabled and no such warnings are
produced. So we're forced to use ACONTROL like this around this bizarre
case:
PUSH ACONTROL
ACONTROL TYPECHECK(NOMAGNITUDE)
E555 C01E FFFF CLHHSI HWord,-1 Is it negative one?
A784 000C JE NegOne Branch if yes
POP ACONTROL
It seems a ridiculous misunderstanding on the part of the assembler...
--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/
--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.