Advertisement
Guest User

Untitled

a guest
Apr 15th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MPASM 0.69 KB | None | 0 0
  1. .globl  readtwo         #Start of readtwo function
  2. .ent    readtwo
  3. readtwo:
  4.  
  5.     li $v0, 4           #prompts user to input a number
  6.     la $a0, msg1
  7.     syscall
  8.    
  9.     li $v0, 5           #Gets users input
  10.     syscall
  11.     move $t0, $v0
  12.    
  13.     li $v0, 4           #prompts user to input a second number
  14.     la $a0, msg2
  15.     syscall
  16.    
  17.     li $v0, 5           #Gets users second input
  18.     syscall
  19.     move $t1, $v0
  20.    
  21.     jr $ra
  22.  
  23. .end    readtwo         #End of readtwo function
  24.  
  25.  
  26. .globl  findminmax      #Start of findminmax function
  27. .ent    findminmax
  28. findminmax:
  29.    
  30.     bgt $t3, $t0, $t1
  31.     blt $t2, $t0, $t1
  32.    
  33.     jr $ra
  34.  
  35. .end    findminmax      #End of findminmax function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement