ID Number: Q76911
6.00 6.00a 6.00b | 6.00 6.00a 6.00b
MS-DOS | OS/2
buglist6.00 buglist6.00a buglist6.00b
Summary:
PROBLEM ID: MSM9109006
SYMPTOMS
Using the Microsoft Macro Assembler (MASM) versions 6.0, 6.0a or
6.0b, the JMP instruction will jump to the procedure name rather
than a short label if the names of the procedure and the label are
identical. After the jump, the procedure begins running (rather
than the code at the label).
The sample code below should generate a syntax error stating that
the procedure name and label name are identical.
RESOLUTION
To work around the problem, create a label with a name that is
different from the procedure name.
STATUS
Microsoft has confirmed this to be a problem in MASM version 6.0,
6.0a, and 6.0b. We are researching this problem and will post new
information here as it becomes available.
More Information:
The sample code below should generate a syntax error stating that the
procedure name and label name are identical. However, the assembler
creates a valid .OBJ file and when run, jumps to the procedure name
rather than the label name.
Sample Code
-----------
; Assemble options needed: None
.MODEL SMALL
.STACK
.DATA
.CODE
.STARTUP
call myproc
.EXIT
myproc PROC
jmp SHORT mylabel
nop
mylabel: nop
ret
myproc ENDP
mylabel PROC
ret
mylabel ENDP
END
Additional reference words: 6.00 6.00a 6.00b