X-Git-Url: https://hackdaworld.org/gitweb/?p=info3%2Fasm.git;a=blobdiff_plain;f=loesung2-1.s;fp=loesung2-1.s;h=1f74b02e7876e19c7ffa55f57f410e457294cbe5;hp=ff30902573d6a16213af0571ae696d9002536174;hb=7184d377183f5278d144a9c9457d439e259b315b;hpb=5d8737f29e02fcfded3aae35c853737e7f9d268c diff --git a/loesung2-1.s b/loesung2-1.s index ff30902..1f74b02 100644 --- a/loesung2-1.s +++ b/loesung2-1.s @@ -12,20 +12,20 @@ text: .asciiz "gimme input: " ; das input zeug tut irgendwie nicht im windlx mit wine :( addi r1,r0,5 ; deshalb mach ich mal das 5er 1x1 -addi r2,r0,19 -addi r3,r0,0 +addi r2,r0,20 +addi r3,r0,0x300 addi r4,r0,0 -J loop +j loop loop: +beqz r2,quit +subi r2,r2,1 add r4,r4,r1 addi r3,r3,4 -sw 0x300(r3),r4 -beqz r2,end -subi r2,r2,1 -J loop +sw (r3),r4 +j loop -end: +quit: trap 0