From: hackbard Date: Tue, 22 Apr 2003 16:37:03 +0000 (+0000) Subject: added aufgabe 2 X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=984c02c31f5fff22c5c16e9a1e2dc2d5109ecff3;p=info3%2Fasm.git added aufgabe 2 --- 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) + + +