From: hackbard Date: Mon, 28 Apr 2003 18:35:10 +0000 (+0000) Subject: added 3 X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f58950e431cfa5c072b51c3a66f4ad382709015f;p=info3%2Fasm.git added 3 --- diff --git a/loesung1-1.s b/loesung1-1.s index e2ccd27..8bc91bd 100644 --- a/loesung1-1.s +++ b/loesung1-1.s @@ -14,3 +14,4 @@ sll r6,r5,1 ;add r6,r5,r5 sw 0x220,r6 +trap 0 diff --git a/loesung1-3.s b/loesung1-3.s new file mode 100644 index 0000000..7e25008 --- /dev/null +++ b/loesung1-3.s @@ -0,0 +1,28 @@ +; blatt 1 +; aufgabe 3 + +.data 0x200 +basis: .word 0x05 +; wir berechnen 5 +exponent: .word 0x03 +; hoch 3 +ergebnis: .space 4 +; und bekommn hoffentlich 125 = 0x7d + +.text + +addi r5,r0,basis +addi r6,r0,exponent +lw r1,(r5) +lw r2,(r6) +addi r3,r0,1 + +J routine + +routine: + beqz r2,end + mult r3,r3,r1 + subi r2,r2,1 + J routine +end: + sw ergebnis,r3