From: hackbard Date: Mon, 28 Apr 2003 22:26:45 +0000 (+0000) Subject: initial checkin 2.2 X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2683f5044ac16d831b48cc8c6f106b1b3e0f6e3;p=info3%2Fasm.git initial checkin 2.2 --- diff --git a/loesung2-2.s b/loesung2-2.s new file mode 100644 index 0000000..582feaa --- /dev/null +++ b/loesung2-2.s @@ -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