Question: Based on the table, dogs are often sized by weight as follows: table [ [ Weight , Size ] , [ Size Code,Up to

Based on the table, dogs are often sized by weight as follows:
\table[[Weight,Size],[Size Code,Up to 20 lbs],[XS,A],[20-30lbs,S],[S,30-50lbs],[M,M],[50-90lbs,L],[L,90 or more],[XL,X]]
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 the Sample Programs in 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
Based on the table, dogs are often sized by

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!