// addcptr.c -- C pgm calls sum procedure defined in addaptr.asm.
// adds two numbers entered by user and outputs result.

// Set up as a Microsoft VC++ (.NET) Win32, EMPTY Console application:
// New Project / Visual C++ Projects / Win32 Project
// Enter Name and Location
// Application Settings / Console application / Empty project / Finish

// To get an assembly listing (.cod flie) Properties / C/C++ / Output files / Assembler listing

// Add this file and the addaptr.obj assembled file to the project
// and do a build

// Or alternatively, add addaptr.asm and do as custom build as
// See .asm source for instructions

#include <stdio.h>

extern sum(int x, int y, int * z);
   int a, b, c;
   printf ("Enter two integers\n");
   scanf ("%d %d", &a, &b);
   sum (a,b,&c);
   printf ("The sum of %d and %d is %d\n", a, b, c);