aboutsummaryrefslogtreecommitdiffstats
path: root/ARM_assembly/MultProject/SudoCode.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ARM_assembly/MultProject/SudoCode.txt')
-rw-r--r--ARM_assembly/MultProject/SudoCode.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ARM_assembly/MultProject/SudoCode.txt b/ARM_assembly/MultProject/SudoCode.txt
new file mode 100644
index 0000000..a4dc6ad
--- /dev/null
+++ b/ARM_assembly/MultProject/SudoCode.txt
@@ -0,0 +1,22 @@
+Sudo code for SMULT64X64:
+
+let result be split into result0 and result1 where they correspond to the 64 LSBs and MSBs of result respectively.
+
+void SMULT64X64(num0, num1, result) {
+
+ previousBit = 0;
+ result0 = num0;
+
+ for(int i = 0; i < 64; i++) {
+ currentBit = num0 & 1;
+
+ if(currentBit == 0 && previousBit == 1) {
+ result1 += num1;
+ } else if(currentBit == 1 && previousBit == 0) {
+ result1 -= num1;
+ }
+
+ result = result >> 1;
+ previousBit = currentBit;
+ }
+}