diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/MULTEST.C | |
| download | Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2 | |
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 );
+}
|
