summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/ADD64_1.C
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/ADD64_1.C')
-rw-r--r--Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/ADD64_1.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/ADD64_1.C b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/ADD64_1.C
new file mode 100644
index 0000000..9a7744f
--- /dev/null
+++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/ADD64_1.C
@@ -0,0 +1,10 @@
+#include "int64.h"
+
+void add_64(int64 *dest, int64 *src1, int64 *src2)
+{ unsigned hibit1=src1->lo >> 31, hibit2=src2->lo >> 31, hibit3;
+ dest->lo=src1->lo + src2->lo;
+ hibit3=dest->lo >> 31;
+ dest->hi=src1->hi + src2->hi +
+ ((hibit1 & hibit2) || (hibit1!= hibit3));
+ return;
+}