]> hackdaworld.org Git - info3/asm.git/commitdiff
added 3
authorhackbard <hackbard>
Mon, 28 Apr 2003 18:35:10 +0000 (18:35 +0000)
committerhackbard <hackbard>
Mon, 28 Apr 2003 18:35:10 +0000 (18:35 +0000)
loesung1-1.s
loesung1-3.s [new file with mode: 0644]

index e2ccd2774bad30368ca8ea40106d52918b69e0ec..8bc91bd1c65f80383bd5d928ca4ce5a3a4dbc860 100644 (file)
@@ -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 (file)
index 0000000..7e25008
--- /dev/null
@@ -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