projects
/
info3
/
asm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
f570cf64fa526a429c6670c6707fc39e30cc295c
[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
; er hat 0 ausgegeben, sehr spektakulaer!
27
28
; b)
29
30
addi r1,r0,inputtext
31
jal InputUnsigned
32
sw 0x220,r1
33
34
; c)
35
36
trap 0
37