Question: PROGRAM 4: SMC Fee Calculator Write an HLA Assembly language program that calculates student enrollment fees at Santa Monica College. (Since we only know

PROGRAM 4: SMC Fee Calculator Write an HLA Assembly language program that

PROGRAM 4: SMC Fee Calculator Write an HLA Assembly language program that calculates student enrollment fees at Santa Monica College. (Since we only know how to deal with integer arithmetic, our program will be slightly inaccurate). As of Summer 2018, the enrollment fee is $46/unit for residents and $370/unit for all others. The student services fee is $48 for Winter or Summer and $51 for Fall or Spring. The purchase of a parking decal is optional which costs $85 in Fall/Spring or $45 in Winter/Summer. The enrollment fee will be entered based on a single 8-bit value entered by the user. The fee will have the format: prsseeee, where ss is a two-bit value corresponding to the semester (00 for Fall, 01 for Winter, 10 for Spring or 11 for Summer), eeee is a four-bit value corresponding to the number of enrolled units, r is a single bit corresponding to whether the student is a California resident or not and p is a single bit corresponding to whether a parking decal is desired. The format of this bit field is diagrammed below: Semester CA Resident? Parking Decal? Since just 8 bits are being entered, your program should expect to read 2 hexidecimal digits. Below are some sample program dialogues that demonstrate these ideas. (Hint: Do this in small steps, bit-by-bit. There's alot to it...) (Further Hint: The most important part of this assignment is to worked with the packed data field entered by the user to extract the sub-parts out of it. The overlapping design of the Intel registers helps you parse this kind of data field and you can shift the bits around to get the right part into BH or BL, for example...). (Further Hint: You can read hex numbers by reading directly into a register.) (Final Hint: Since we haven't learned how to do multiplication yet, although it's kinda painful, I was expecting that you would perform the multiplication by a looping set of addition instructions) 12 units CA Resident Enrolled Units Feed me (2 hex digits with the bits praseece): CC Fall Semester Parking Total Fees = $ 688 Feed me (2 hex digits with the bits prsseeee): 4C Fall Semester 12 units CA Resident No Parking Total Fees - $ 603

Step by Step Solution

3.37 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

solution in HLA Assembly language that calculates student enrollment fees at Santa Mo... View full answer

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!