summaryrefslogtreecommitdiff
path: root/I_anno
diff options
context:
space:
mode:
Diffstat (limited to 'I_anno')
-rw-r--r--I_anno/Architettura_Elaboratori/division.asm23
1 files changed, 23 insertions, 0 deletions
diff --git a/I_anno/Architettura_Elaboratori/division.asm b/I_anno/Architettura_Elaboratori/division.asm
new file mode 100644
index 0000000..6b9f80a
--- /dev/null
+++ b/I_anno/Architettura_Elaboratori/division.asm
@@ -0,0 +1,23 @@
+op_a dcd 42
+op_b dcd 6
+
+ mov r0, #op_a
+ ldr r1, [r0]
+
+ mov r0, #op_b
+ ldr r2, [r0]
+
+ mov r0, #0
+
+loop
+ cmp r1, r2
+ blt loop_end
+
+ sub r1, r1, r2
+ add r0, r0, #1
+
+ b loop
+
+loop_end
+
+ end