<<< Local Variables and EBP, Base Pointer Access to Stack | Index | The LOCAL directive >>> |
LOCAL directive automates the process for creating local variables on the stack.
LOCAL frees the programmer from having to count stack bytes.
LOCAL makes code easier to write and maintain.
The assembler calculates how much space required on the stack by locals and generates instructions to
properly decrement ESP upon entry
reset ESP upon return from the procedure by RET N; instruction.
LOCAL variables make possible to refer to the variables by name rather than EBP offset pointing to the stack.
Sample program: local_automated.asm
<<< Local Variables and EBP, Base Pointer Access to Stack | Index | The LOCAL directive >>> |