LOCAL Directive with a Structure

ID Number: Q59585

5.10 5.10a | 5.10 5.10a

MS-DOS | OS/2

buglist5.10 fixlist5.10a

Problem:

On Page Update-42 of the "Microsoft Macro Assembler for MS OS/2 and

MS-DOS Operating Systems Version 5.1 Update" manual, it states that

you can use the LOCAL directive with a structure. When this is done,

you may receive the following errors:

A2003 Unknown Type Specifier

A2010 Syntax Error

The following code demonstrates this problem:

.model small,c

.stack 100h

parms struc

p1 dw ?

p2 dw ?

parms ends

.code

call test_func

test_func proc

LOCAL stuff:parms ;A2003 Unknown type specifier

mov ax,0ffffh

mov stuff.p1,ax ;A2010 Syntax error

mov stuff.p2,ax ;A2010 Syntax error

ret

test_func endp

end

Response:

Microsoft has confirmed this to be a problem in MASM version 5.1. This

problem has been corrected in MASM version 5.1a.

To avoid the A2003 Unknown type specifier error, include the PTR

keyword in the LOCAL directive. For example:

LOCAL stuff:ptr parms

To avoid the A2010 Syntax error, use the MASM 5.1a update assembler.

To obtain MASM5.10A, contact Microsoft Product Support at (206)

646-5109.

Additional reference words: 5.10 5.10a