mips2.asm - .data.asciiz"Enter a...

This preview shows page 1 out of 1 page.

.data.asciiz "Enter a number " #0.asciiz "\n" #16.asciiz "Tan Dao\n" #18.textmain: lui $s7,0x1001# set the location 0x1001 at s7addi $t0,$t0,0# count variable lui $s0,0x1001 # save the array in location 0x1001addi $s0, $s0,0x60# set location of $s0 start at 0x10010060addi $s2,$s2,0#index =0addi $t3,$t3,0#increment =0loop:slti $t1,$s2,10# set indet < 10beq $t1,$0,end# check t1 to end loopadd $a0,$0,$s7# set location s7 to a0addi $a0,$a1,0# call the location to a0 (Enter a number)addi $v0,$0,4# command print String

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture