mips1.asm - #Programer Tan Dao#Csc 230 ID 73942 Assigment...

This preview shows page 1 - 3 out of 3 pages.

#Programer: Tan Dao #Csc 230 ID: 73942 # Assigment 4 #professor: Debra Callis #Octrober, 8,2019 .data .asciiz "Enter a number " #0 .asciiz "\n" #16 .asciiz "Tan Dao\n" #18 .text .globl main main: lui $s7,0x1001 # set the location 0x1001 at s7 lui $s0,0x1001 # save the array in location 0x1001 addi $s0, $s0,0x60 # set location of $s0 start at 0x10010060 add $a0,$0,$s7 # set location s7 to a0 addi $a0,$a0,0 # call the location to a0 (Enter a number) addi $v0,$0,4 # command print String syscall addi $a0,$s7,0 # reset a0 back to location 1001 add $a0,$0,$s7 # set location s7 to a0 addi $a0,$a0,16 # call the location to a0 (\n) addi $v0,$0,4 # command print String syscall addi $a0,$s7,0 # reset a0 back to location 1001 add $a0,$0,$s7 # set location s7 to a0 addi $a0,$a0,18 # call the location to a0 (Tan Dao) addi $v0,$0,4 # command print String syscall addi $a0,$s7,0 # reset a0 back to location 1001 #------------------------------------------------------------------- add $a0,$0,$s7 # set location s7 to a0 addi $a0,$a0,18 # call the location to a0 (Tan Dao) addi $v0,$0,4 # command print String syscall addi $a0,$s7,0 # reset a0 back to location 1001 jal readvals ori $a0, $a0, 0 # save the result end: ori $v0, $0, 10 # set command to stop program,

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture