<<< Automated Local Variables | Index | Local Variable Initialization >>> |
The LOCAL directive must be on the line immediately following the PROC statement with the following syntax:
LOCAL vardef, vardef, vardef...
Each vardef defines a local variable.
Local variable definition formats:
LOCAL label:qualifiedtype, label[ count ]:qualifiedtype
where
label is the name of the local variable.
count is the number of array elements, making local variable a simple array on the stack with count.
qualifiedtype is a valid MASM data type.
For example,
ARRAY_SIZE EQU 20 myproc PROC NEAR32 C USES edi, arg:DWORD LOCAL myarray[ ARRAY_SIZE ] : BYTE LOCAL var2 : WORD . ret myproc ENDP
<<< Automated Local Variables | Index | Local Variable Initialization >>> |