Course Solutions Uncategorized (Solved) : Assembly Mips Program Uses Loops Give Pattern Numbers 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Please Q26807253 . . . .

(Solved) : Assembly Mips Program Uses Loops Give Pattern Numbers 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Please Q26807253 . . . .

 

an assembly MIPS program that uses loops only will give me thispattern of numbers:

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

please I want something very basic

here is my my sloution but it has errors

    .data
  
   msg1:   .asciiz “n”
  
   .text
  
   addi $t0,$t0,6 #t0 = 5
  
  
loop1:   blt $t0,0,exit
   subi $t0,$t0,1
  
   li $v0,4
   la $a0, msg1
   syscall
  
loop2:   bge $t1,$t0,loop1
   addi $t1,$t1,1
  
  
   li $v0,1 #printing int
   move $a0,$t1
   syscall
  
  
   li $v0,11
   la $a0,’ ‘
   syscall

   j loop2
   exit:
   li $v0,10
   syscall
  
  

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post