Write an assembly language program using NASM on the given virtual machine that uses the Harris-Benedict equation to calculate the amount of calories necessary to maintain your weight.
The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do NO exercise. This is called your basal metabolic rate or BMR.
The calories needed for a woman to maintain her weight are:
BMR = 655 + (4.3 x weight in pounds) + (4.7 x height in inches) - (4.7 x age in years)
The calories needed for a man to maintain his weight are:
BMR = 66 + (6.3 x weight in pounds) + (12.9 x height in inches) - (6.8 x age in years)
1. (30%) The program should ask the user for weight (in lbs), height (in inches), sex (1 for female and 2 for male), and age (in years).
a. These can ALL be integers (makes it much easier).
b. Make sure to PROMPT the user for what you want!
2. (20%) Once we have this, we can jump to the area where the correct BMR is calculated based on whether the user is a female or male.
3. (40%) Now, we can calculate the BMR using the weight, height, and age obtained from step 1 using the formulas for BMR above (may require multiple steps).
4. (10%) Your program should output the results as follows (either - or -- depends on whether the user selected male or female):
a. "As a male, you would need to consume X calories to maintain your weight based on your given height H, weight W, and age A"
i. Where A = age, W = weight, H = height, and X = result of the BMR calculation.
b. "As a female, you would need to consume X calories to maintain your weight based on your given height H, weight W, and age A"
i. Where A = age, W = weight, H = height, and X = result of the BMR calculation.