Anonymous
timer Asked: Apr 12th, 2020

Question Description

Please complete the following tasks to signify your successful completion of Unit 9. It should be the case that the only instructions you need to complete the programs assigned here are the ones I've described so far. Click hereLinks to an external site. to see an HLA Programmer's Reference Guide for the instructions we've learned so far. http://homepage.smc.edu/stahl_howard/cs17/FileManager/referenceguides/referenceguideiv.htm


Following the Electronic Submission Guidelines, please send me a copy of the .hla file you created for this assignment.

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 Spring 2020, the enrollment fee is $46/unit for residents and $370/unit for all others. The student services fee is $50 for Winter or Summer and $53 for Fall or Spring. The ID card is optional which saves $13 when its purchase is declined.

The enrollment fee will be entered based on a single 8-bit value entered by the user. The fee will have the format: sseeeeri, 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 i is a single bit corresponding to whether the ID Card Fee is being paid. The format of this bit field is diagrammed below:

BitField.jpg
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... )
(Another Hint: HLA read in hex format when you read directly into a register. So do that...)
(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... )
(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)

Feed me(2 hex digits with the bits sseeeeri): 00
Sorry Charlie, badly formed data!

Feed me(2 hex digits with the bits sseeeeri): C3
Sorry Charlie, badly formed data!

Feed me(2 hex digits with the bits sseeeeri): 3E
Fall Semester
15 units
CA Resident
No ID Card
Total Fees = $ 730

Feed me(2 hex digits with the bits sseeeeri): 3C
Fall Semester
15 units
Non-Resident
No ID Card
Total Fees = $ 5590

Feed me(2 hex digits with the bits sseeeeri): 45
Winter Semester
1 unit
Non-Resident
ID Card
Total Fees = $ 420

Feed me(2 hex digits with the bits sseeeeri): 47
Winter Semester
1 unit
CA Resident
ID Card
Total Fees = $ 96

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Similar Questions
Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors