cEnd [procName]
The cEnd macro defines the exit point for the function given by the procName parameter. The macro creates code that discards the frame, restores registers, and returns to the caller.
procName
Specifies a function name. This parameter is optional; if the parameter is given, it must be the same as the name given in the cBegin macro immediately preceding the cEnd macro.
Once a function has been defined using the cProc macro, any formal parameters should be declared with the parmX macro and any local variables with the localX macro. The cBegin and cEnd macros must be used to delineate the code for the function.
The following example demonstrates the usage of the cEnd macro:
cProc
strcpy,<PUBLIC>,<si,di> parmW dst parmW src localW cnt cBegin cld mov si,src mov di,dest push ds pop es xor cx,cx mov cnt,cx loop: lodsb stosb inc cnt cmp al,0 jnz loop mov ax,cnt cEnd