X-Git-Url: https://hackdaworld.org/gitweb/?p=info3%2Fasm.git;a=blobdiff_plain;f=loesung1-2.s;fp=loesung1-2.s;h=bd7953408ecd877af396b4e431f32814c7c56d12;hp=0000000000000000000000000000000000000000;hb=984c02c31f5fff22c5c16e9a1e2dc2d5109ecff3;hpb=89a03487325a938b48f1d881ce366cc88e0592dc diff --git a/loesung1-2.s b/loesung1-2.s new file mode 100644 index 0000000..bd79534 --- /dev/null +++ b/loesung1-2.s @@ -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) + + +