assembler (procedure directive)
In an, you can write complete procedures and functions in built-in assembler, without a begin...end statement .
The assembler directive causes the compiler to perform these code-generation optimizations:
- Value Parameters: The compiler does not generate code to copy value
parameters into local variables.
- Function Result Variable: The compiler does not allocate a function
result variable, and a reference to the symbol is an error.
- Stack Frame: The compiler generates no stack frame for procedures and
functions with no parameters or local variables.
The value-parameters optimization affects all string-type value parameters and other value parameters whose size is not 1, 2, or 4 bytes.
Within the procedure or function, such parameters must be treated as var parameters.
String functions are an exception to the function-result optimization--they always have an @Result pointer allocated by the caller.