]> hackdaworld.org Git - info3/asm.git/commitdiff
added aufgabe 2
authorhackbard <hackbard>
Tue, 22 Apr 2003 16:37:03 +0000 (16:37 +0000)
committerhackbard <hackbard>
Tue, 22 Apr 2003 16:37:03 +0000 (16:37 +0000)
loesung1-2.s [new file with mode: 0644]

diff --git a/loesung1-2.s b/loesung1-2.s
new file mode 100644 (file)
index 0000000..bd79534
--- /dev/null
@@ -0,0 +1,38 @@
+; blatt 1
+
+; aufgabe 2
+
+.data
+inputtext: .asciiz "INPUT: "
+.align 2
+outputtext: .asciiz "OUTPUT: %d !"
+.align 2
+outputtextaddr: .word outputtext
+output1: .space 4
+input1: .space 4
+input2: .space 4
+
+.text
+.global main
+
+main:
+
+; a)
+
+lw r1,0x200 ; da steht halt 0 drin ...
+sw output1,r1
+addi r14,r0,outputtextaddr
+trap 5
+trap 0
+; er hat 0 ausgegeben, sehr spektakulaer!
+
+; b)
+
+addi r1,r0,inputtext
+jal InputUnsigned
+sw 0x220,r1
+
+; c)
+
+
+