;/*** addaptr.asm module -- called by main() in addcptr.c ***/ ; This subroutine links to Visual C++ .NET ; in protected mode. It adds two parameters pushed ; on the stack and stores the result in the address ; of the third parameter, also pushed on the stack ; by the calling program. ;Assemble with MASM 6.11: ;ml /c addaptr.asm ;Then add the .obj file to the.NET project ; Or alternatively, from .NET add a custom build step: ; Right click on asm file, then properties -- ; Command Line: ; ml -c -Zi "-Fl$(IntDir)\$(InputName).lst" "-Fo$(IntDir)\$(InputName).obj" "$(InputPath)" ; Outputs: ; $(IntDir)\$(InputName).obj .386P .model flat public _sum .code _sum proc near push ebp mov ebp,esp mov eax,[ebp+8] ; first argument add eax,[ebp+12] ; second argument mov ebx,[ebp+16] ; third argument mov [ebx],eax pop ebp ret _sum endp end