Question
Write a MIPS Assembly program for the following if else High Level Language program ## if-else example ## Pseudo code: ## if (A > 0)
Write a MIPS Assembly program for the following if else High Level Language program
## if-else example
## Pseudo code:
## if (A > 0) then
## B= C div A
## else
## B= A + 10;
##
You may use the following pseudoinstructions
div with 3 registers div rd, rs, rt where quotient of rs and rt is put into rd
load immediate li rd, imm move imm into register rd
unconditional branch b label go to instruction at label
branch on equal zero beqz rs, label conditionally branch to instruction at label if rs equals 0
branch on not equal zero bnez rs, label conditionally branch to instruction at label if rs not equal to 0
move rd, rs - move register rs to rd
You may read two integers A and C from the user and print B on the console.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started