]> hackdaworld.org Git - info3/asm.git/commitdiff
initial checkin 2.2
authorhackbard <hackbard>
Mon, 28 Apr 2003 22:26:45 +0000 (22:26 +0000)
committerhackbard <hackbard>
Mon, 28 Apr 2003 22:26:45 +0000 (22:26 +0000)
loesung2-2.s [new file with mode: 0644]

diff --git a/loesung2-2.s b/loesung2-2.s
new file mode 100644 (file)
index 0000000..582feaa
--- /dev/null
@@ -0,0 +1,31 @@
+; blatt 2
+; aufgabe 2
+
+.data 0x200
+ergebnis: .space 4
+
+.text
+addi r1,r0,1
+addi r2,r0,10
+addi r3,r0,10
+
+J loop
+
+loop:
+beqz r2,end
+subi r2,r2,1
+J innerloop
+
+innerloop:
+beqz r3,refresh
+subi r3,r3,1
+addi r1,r1,1
+J innerloop
+
+refresh:
+addi r3,r0,10
+J loop
+
+end:
+sw ergebnis,r1
+trap 0