summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/MULTEST.C
blob: 5dc30e6d50a4c90dd8c0df095767785c17bb6762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Demonstrate mul64 */

#include <stdio.h>
#include "int64.h"
#include "mul64.h"

int main()
{ int64 res;
  unsigned a,b;

  printf( "Enter two unsigned 32-bit numbers in hex eg.(100 FF43D)\n" );
  if( scanf( "%x %x", &a, &b ) != 2 )
  { puts( "Bad numbers" );
  } else
  { res=mul64(a,b);
    printf( "Least significant word of result is %8X\n", res.lo );
    printf( "Most  significant word of result is %8X\n", res.hi );
  }
  return( 0 );
}