Question: Can you help with the real code that actully run and work becuse most of the codes doesnot run plz PROGRAM 7 : Tuition Calculator

Can you help with the real code that actully run and work becuse most of the codes doesnot run plz PROGRAM 7: Tuition Calculator
Write an HLA Assembly language program that calculates the cost of tuition at SMC. Different choices will be represented by a bit field as shown below:
Since just 8 bits are being entered, your program should expect to read 2 hexidecimal digits.
The four low-order bits (shown in orange) represent the number of enrolled units. Your
code should ensure the value is not zero.
Since just 8 bits are being entered, your program should expect to read 2 hexidecimal digits.
The four low-order bits (shown in orange) represent the number of enrolled units. Your code should ensure the value is not zero.
The next two bits (shown in purple) represents the term. Some of the different fees various based on the term of enrollment. 00 means Fall, 01 means Winter, 10 means Spring and 11 means Summer.
The next bit (shown in red) represents whether a student is a California resident. 0 means nonresident, 1 means California resident
The next two bits (shown in purple) represents the term. Some of the different fees various based on the term of enrollment. 00 means Fall, 01 means Winter, 10 means Spring and 11 means Summer.
The next bit (shown in red) represents whether a student is a California resident. 0 means nonresident, 1 means California resident
The high-order bit (shown in blue) represents whether a students wants to buy a parking decal for this term. 0 means no parking decal, 1 means parking decal.
Based on these choices, here are the fees that apply to students this Fall 2024:
\table[[Fee,Fall or Spring,\table[[Winter or],[Summer]]],[Tuition,\table[[$46 per unit for CA residents],[$374 per unit for non-residents]],],[Parking,\table[[$50 for parking],[decal]],\table[[$25 for a],[parking decal]]]]
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. Just don't use EAX since stdin.get uses that one when it executes.)
(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)
Units enrolled cannot be zero!
Feed me(2 hex digits): 01
1 Unit(s)
Fall
No parking
Non-CA Resident
Tuition: $374
Feed me(2 hex digits): FF
15 Unit(s)
Summer
CA Resident
Parking
Tuition: $715
Feed me(2 hex digits): 6F
15 Unit(s)
Spring
CA Resident
No parking
Tuition: $690
PROGRAM 7: Tuition Calculator
Write an HLA Assembly language program that calculates the cost of tuition at SMC. Different choices will be represented by a bit field as shown below:
Since just 8 bits are being entered, your program should expect to read 2 hexidecimal digits.
The four low-order bits (shown in orange) represent the number of enrolled units. Your code should ensure the value is not zero.
The next two bits (shown in purple) represents the term. Some of the different fees various based on the term of enrollment. 00 means Fall, 01 means Winter, 10 means Spring and 11 means Summer.
The next bit (shown in red) represents whether a student is a California resident. 0 means non-resident, 1 means California resident
The high-order bit (shown in blue) represents whether a students wants to buy a parking decal for this term. 0 means no parking decal, 1 means parking decal.
Based on these choices, here are the fees that apply to students this Fall 2024:
\table[[Fee,Fall or Spring,Winter or Summer],[Tuition,,\table[[$46 per unit for CA residents],[$374 per unit for non-residents]]],[Parking,,,$25 for a parking decal]]
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. Just don't use EAX since stdin.get uses that one when it executes.
Can you help with the real code that actully run

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!