Define 2 variables vx and vy. Initialize vx and vy with numbers
100 and 200 respectively. Prompt user to enter 2 numbers, save them
into vx and vy.
This is meant to be done in MIPS assembly language.
.data ask_v1: .asciiz "Enter v1: " ask_v2: .asciiz "Enter v2: " result: .asciiz "You entered " and_s: .asciiz " and " vx: .word 100 vy: .word 200 .text la $a0, ask_v1 li $v0, 4 syscall li $v0, 5 syscall sw $v0, vx la $a0, ask_v2 li $v0, 4 syscall li $v0, 5 syscall sw $v0, vy la $a0, result li $v0, 4 syscall lw $a0, vx li $v0, 1 syscall la $a0, and_s li $v0, 4 syscall lw $a0, vy li $v0, 1 syscall
Get Answers For Free
Most questions answered within 1 hours.