projects
/
info3
/
asm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
added aufgabe 2
[info3/asm.git]
/
loesung1-2.s
1
; blatt 1
2
3
; aufgabe 2
4
5
.data
6
inputtext: .asciiz "INPUT: "
7
.align 2
8
outputtext: .asciiz "OUTPUT: %d !"
9
.align 2
10
outputtextaddr: .word outputtext
11
output1: .space 4
12
input1: .space 4
13
input2: .space 4
14
15
.text
16
.global main
17
18
main:
19
20
; a)
21
22
lw r1,0x200 ; da steht halt 0 drin ...
23
sw output1,r1
24
addi r14,r0,outputtextaddr
25
trap 5
26
trap 0
27
; er hat 0 ausgegeben, sehr spektakulaer!
28
29
; b)
30
31
addi r1,r0,inputtext
32
jal InputUnsigned
33
sw 0x220,r1
34
35
; c)
36
37
38