ID Number: Q72323
3.00 3.10 3.11 3.14 | 3.00 3.10 3.11 3.12 3.50
MS-DOS | OS/2
Summary:
The Label/Function Search command in CodeView versions 3.0, 3.1, 3.11,
3.12, 3.14, and 3.5 do not find PROC labels in assembly programs
assembled with the Microsoft Macro Assembler (MASM) version 5.1 or
5.1a. Searching for a PROC label in this case will result in the
following CodeView error message:
Error - Unknown symbol
This is expected behavior that results from a difference in the
CodeView symbolic information between MASM versions 5.1 and 6.0 and
the way this information is interpreted by CodeView versions 2.x and
3.x. CodeView versions 3.0, 3.1, 3.11, 3.12, 3.14, and 3.5 will search
successfully for PROC labels in code assembled with MASM version 6.0.
More Information:
The sample code below can be used to demonstrate this situation if it
is assembled with MASM version 5.1 or 5.1a and brought up in CodeView
version 3.0 or later. If a Label/Function Search is performed for
"func", the debugger should switch to the location in the source file
for that function; however, these versions of CodeView display the
above error message instead.
Conversely, PROC labels assembled with MASM versions 5.1 and 5.1a are
found by CodeView version 2.2 (shipped with MASM 5.1) as long as the
labels are declared as PUBLIC. This is also shown in the following
sample code.
Sample Code
-----------
;Assemble options needed: /Zi
; LINK options needed: /CO
.MODEL small
.STACK
.DATA
msg DB "Hello", 13, 10, "$"
PUBLIC func ;needed by CodeView 2.2
.CODE
start: mov ax, SEG msg
mov ds, ax
call func
mov ah, 4Ch
int 21h
func PROC
mov ah, 09h
mov dx, OFFSET msg
dosint: int 21h
ret
func ENDP
END start
Additional reference words: 2.20 3.00 3.10 3.50 5.10 5.10a 6.00