MIPS Project1-MIPS Assembly 1  Solved

30.00 $

Category:

Description

Rate this product

In this start-up project, you are required to get familiar with both MARS (MIPS

Assembler and Runtime Simulator) programming environment and basic MIPS (Microprocessor without Interlocked Pipeline Stages) integer instructions. Please write a program to perform body mass index (BMI) computation. The inputs (weight in kilogram and height in centimeter) and output (BMI) are all integers. Do NOT use any floating point instruction in this project. The formula for BMI computation is listed as

𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊ℎ𝑡𝑡×10000 follows. BMI =        𝐻𝐻𝑊𝑊𝑊𝑊𝑊𝑊ℎ𝑡𝑡2       . If the BMI is larger than or equal to 24, print “You are

overweight”. If the BMI is less than or equal to 18, print “You are underweight”.

 

Please submit your source code according to the following rules:

  • Write down enough comments such that you would receive higher scores.
  • The filename is your student ID (e.g., B12345678.asm).

 

Example:

 

Please input your weight in kilogram:

80

Please input your height in centimeter:

170

Your BMI is 27. You are overweight.

 

Please input your weight in kilogram:

50

Please input your height in centimeter:

165

Your BMI is 18. You are underweight.

 

Please input your weight in kilogram:

55

Please input your height in centimeter:

160

Your BMI is 21.

 

  • Proj1-8yg269.zip