diff options
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/MULTEST.C')
| -rw-r--r-- | Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/MULTEST.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/MULTEST.C b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/MULTEST.C new file mode 100644 index 0000000..5dc30e6 --- /dev/null +++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/MULTEST.C @@ -0,0 +1,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 );
+}
|
