Question: PROGRAM 1 2 : Dog Sizes Based on the table above, dogs are often sized by weight as follows: WeightSizeSize CodeUp to 2 0 lbsXSA

PROGRAM 12: Dog Sizes
Based on the table above, dogs are often sized by weight as follows:
WeightSizeSize CodeUp to 20 lbsXSA20-30 lbsSS30-50 lbsMM50-90 lbsLL90 or moreXLX
Write an HLA Assembly language program that implements the following function:
procedure dog( weight : real32); @nodisplay; @noframe;
Your function should return in AL the Size Code value, as shown in the chart above.
(Hint: Please review theSample Programsin Floating Point unit to see how to compare floating point values. You need to use the floating point instruction fcomp as shown on the second example program.)
(Second Hint: To load declared int32 integral values into the FPU, you must use FILD, not FLD.)
gimme you dog's weight (in lbs): 9.5
size code: A
gimme you dog's weight (in lbs): 25.0
size code: S
gimme you dog's weight (in lbs): 91.12
size code: X

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!