X-Git-Url: https://hackdaworld.org/gitweb/?p=info3%2Fasm.git;a=blobdiff_plain;f=loesung1-3.s;fp=loesung1-3.s;h=7e250086618cabc5b71fde60667fefa244989272;hp=0000000000000000000000000000000000000000;hb=f58950e431cfa5c072b51c3a66f4ad382709015f;hpb=b09182f509a426f8afddfd09d37bc689952ce113 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