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 1 and 3,000. 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
$2,000 and above Platinum
$1,500 to $1,999 Gold
$1,000 to $1,499 Silver
$500 to $999 Bronze
$1 to $499 Brass. This is my work so far, but it does NOT build: INCLUDE Irvine32.inc
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode : dword
.data
prompt BYTE "Enter an integer dollar amount between 1 and 3,000",0
invalid BYTE "ERROR: value is outside the range!", 0
platinum db "Platinum", 0
gold db "Gold", 0
silver db "Silver", 0
bronze db "Bronze", 0
brass db "Brass", 0
.code
main proc
mov eax, 4
mov ebc, 1
mov ecx, prompt
mov edx, 16
L1:
cmp eax, 2000
jl L2
cmp eax, 3000
jg L2
mov eax, 4
mov ebx, 1
mov ecx, platinum
mov edx, 1
jmp L7
L2:
cmp eax, 1500
jl L3
cmp eax, 1999
jg L3
mov eax, 4
mov ebx, 1
mov ecx, gold
mov edx, 1
jmp L7
L3:
cmp eax, 1000
jl L4
cmp eax, 1499
jg L4
mov eax, 4
mov ebx, 1
mov ecx, silver
mov edx, 1
jmp L7
L4:
cmp eax, 500
jl L5
cmp eax, 999
jg L5
mov eax, 4
mov ebx, 1
mov ecx, bronze
mov edx, 1
jmp L7
L5:
cmp eax, 1
jl L6
cmp eax, 499
jg L6
` mov eax, 4
mov ebx, 1
mov ecx, brass
mov edx, 1
jmp L7
L6:
mov eax, 4
mov ebx, 1
mov ecx, invalid
mov edx, 13
L7:
mov eax, 1
xor ebx, ebx
ivoke ExitProcess, 0
main ENDP
END main
I need help with this project: Write an assembly

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!