Hi, How do create a local byte array... like this void func() { char szBuf[10]; } Clark
Posted on 2001-06-19 05:46:00 by Superman_San
Syntax: LOCAL name [][:qualifiedtype] [, name [] [:qualifiedtype]]... Description: Generates code to create one or more stack (automatic) variables, which can be accessed only within the current procedure. The assembler uses the same method used by high-level languages to create local variables. The parameter is the name of the variable, and is an optional expression (which must appear in square brackets) indicating the number of elements to allocate. The parameter is any qualified type appropriate to . The default is WORD in a 16-bit segment and DWORD in a 32-bit segment. Once declared in a LOCAL statement, local variables can be referred to by name. The assembler translates references to these variables into references to their actual location on the stack using the BP indirect addressing mode. The assembler will generate an error if you have already defined as a label. Example: LOCAL array[20]:BYTE
If in doubt read the manual :P

func proc
  LOCAL szBuf[10]:BYTE

func endp
Is the litteral translation for your code. A stupid function though, as it creates space on the stack, then removes it. But hey are examples meant to be complex? Mirno
Posted on 2001-06-19 06:18:00 by Mirno