Question: I need help with this project: Write an assembly language program that asks the user to enter an integer dollar amount between 1 and 3
I need help with this project: Write an assembly language program that asks the user to enter an integer dollar amount between and Your program should display the corresponding class description using the following table. Write the program so that it executes until the user inputs some value that you determine to be the "sentinel value". Your program must guard against and provide user messages for input values that are outside the valid range.
Donation Amount dollars Class of Donation
$ and above Platinum
$ to $ Gold
$ to $ Silver
$ to $ Bronze
$ to $ Brass. This is my work so far, but it does NOT build: INCLUDE Irvineinc
model flat,stdcall
stack
ExitProcess proto,dwExitCode : dword
data
prompt BYTE "Enter an integer dollar amount between and
invalid BYTE "ERROR: value is outside the range!",
platinum db "Platinum",
gold db "Gold",
silver db "Silver",
bronze db "Bronze",
brass db "Brass",
code
main proc
mov eax,
mov ebc,
mov ecx, prompt
mov edx,
L:
cmp eax,
jl L
cmp eax,
jg L
mov eax,
mov ebx,
mov ecx, platinum
mov edx,
jmp L
L:
cmp eax,
jl L
cmp eax,
jg L
mov eax,
mov ebx,
mov ecx, gold
mov edx,
jmp L
L:
cmp eax,
jl L
cmp eax,
jg L
mov eax,
mov ebx,
mov ecx, silver
mov edx,
jmp L
L:
cmp eax,
jl L
cmp eax,
jg L
mov eax,
mov ebx,
mov ecx, bronze
mov edx,
jmp L
L:
cmp eax,
jl L
cmp eax,
jg L
mov eax,
mov ebx,
mov ecx, brass
mov edx,
jmp L
L:
mov eax,
mov ebx,
mov ecx, invalid
mov edx,
L:
mov eax,
xor ebx, ebx
ivoke ExitProcess,
main ENDP
END main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
