Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #MIPS assembly: Use Mars syscall to prompt user and read value typed in
- .data
- intPrompt: .asciiz "enter an integer: "
- .text
- # Prompt the user ($v0=4)
- la $a0, intPrompt
- li $v0, 4
- syscall
- # Read in an integer ($v0=5)
- li $v0, 5
- syscall # value read in will be saved to $v0
- add $t1, $zero, $v0 #save integer read.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement