PRB: No Error for Same Register Listed Twice in USES Clause (72727)
The information in this article applies to:
- Microsoft Macro Assembler (MASM) 6.0
- Microsoft Macro Assembler (MASM) 6.0a
- Microsoft Macro Assembler (MASM) 6.0b
This article was previously published under Q72727 SYMPTOMS
The USES clause was added to the PROC directive with the release of the
Microsoft Macro Assembler (MASM) version 6.0. With USES, it is possible to
specify the registers that your procedure will use. The assembler will then
save the registers on the stack at function entry and restore them upon
exit, saving the programmer from having to do so.
If you mistakenly list the same register twice in the USES clause, MASM
will not generate a warning. The assembler will generate code to push and
pop the register twice.
CAUSE
This is correct behavior. It is the programmer's responsibility to catch
this type of error.
Modification Type: | Major | Last Reviewed: | 10/29/2003 |
---|
Keywords: | KB72727 |
---|
|