/*
2. Array Manipulation
*/
	#include <stdio.h>
	#include <graphics.h>

	void  main()
	{
	  int  array1[64], array2[64], i, *a1, *a2;
	  char ch;
	  char msg[]="Copiei array1 para array2:\r\n$";
	  char *pmsg=msg;
	  for( i=0; i<64; i++ )
	      array1[i] = 64-i;         /*/ fill array */
	  a1 = &array1[0];         /*/ set up pointers to the */
	  a2 = &array2[0];         /*/ first elements in each array  */

	  asm mov  si,a1    /* get first pointer  */
	  asm mov  di,a2    /* get second pointer */
	  asm mov  cx,64d   /* set up count       */
	  here:
	    asm mov  ax,[si]  /* get source value   */
	    asm mov  [di],ax  /* into dest location */
	    asm add  si,2     /* increment pointers */
	    asm add  di,2
	    asm loop here
	    asm mov dx,pmsg
	    asm mov ah,09h
	    asm int 21h
   
	  /*i=1;
	  qsort(array1,20, &i, (void *) strcmp());*/
	  for( i=0; i<20; i++ )
	    printf("\t%d \t%d \n", array1[i], array2[i] );
       
	}
	
