projects
/
info3
/
asm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b09182f
)
added 3
author
hackbard
<hackbard>
Mon, 28 Apr 2003 18:35:10 +0000
(18:35 +0000)
committer
hackbard
<hackbard>
Mon, 28 Apr 2003 18:35:10 +0000
(18:35 +0000)
loesung1-1.s
patch
|
blob
|
history
loesung1-3.s
[new file with mode: 0644]
patch
|
blob
diff --git
a/loesung1-1.s
b/loesung1-1.s
index
e2ccd27
..
8bc91bd
100644
(file)
--- 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
(file)
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