#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <math.h>


asm void bigadd(x1,x2,y1,y2,z1,z2)
{
% mem x1,x2,y1,y2,z1,z2;
	pushl	%eax
	pushl	%edx
	movl	x1,%eax
	movl	x2,%edx
	addl	y1,%eax
	adcl	y2,%edx
	movl	%eax,z1
	movl	%edx,z2
	popl	%edx
	popl	%eax
}


int main (int argc, char *argv[])
{
unsigned int x1,x2,y1,y2,z1,z2;

x1 = strtoul(argv[1],NULL,0);
x2 = strtoul(argv[2],NULL,0);
y1 = strtoul(argv[3],NULL,0);
y2 = strtoul(argv[4],NULL,0);

bigadd(x1,x2,y1,y2,z1,z2);

printf("%08x%08x + %08x%08x = %08x%08x\n",x2,x1,y2,y1,z2,z1);

return (0);
}
