Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

INCLUDE Irvine 3 2 . inc . data menu BYTE 1 . x > y , 0 BYTE 2 . x >

INCLUDE Irvine32.inc
.data
menu BYTE "1. x > y",0
BYTE "2. x >= y",0
BYTE "3. x y",0
BYTE "4. x = y",0
BYTE "5. x == y",0
BYTE "6. Exit program", 0
true_msg BYTE "TRUE", 0
false_msg BYTE "FALSE", 0
prompt_x BYTE "Enter x: ",0
prompt_y BYTE "Enter y: ",0
.code
main PROC
call display_menu
call read_choice
cmp al,'6'
je exit_program
call read_numbers
cmp al,'1'
je proc_1
cmp al,'2'
je proc_2
cmp al,'3'
je proc_3
cmp al,'4'
je proc_4
cmp al,'5'
je proc_5
jmp main
display_menu PROC
mov edx, OFFSET menu
call WriteString
ret
read_choice PROC
call ReadChar
ret
read_numbers PROC
mov edx, OFFSET prompt_x
call WriteString
call ReadChar
mov x, al
mov edx, OFFSET prompt_y
call WriteString
call ReadChar
mov y, al
ret
proc_1 PROC
; x > y
mov al, x
cmp al, y
jg print_true
jmp print_false
proc_2 PROC
; x >= y
mov al, x
cmp al, y
jge print_true
jmp print_false
proc_3 PROC
; x y
mov al, x
cmp al, y
jl print_true
jmp print_false
proc_4 PROC
; x = y
mov al, x
cmp al, y
jle print_true
jmp print_false
proc_5 PROC
; x == y
mov al, x
cmp al, y
je print_true
jmp print_false
print_true PROC
mov edx, OFFSET true_msg
call WriteString
jmp exit_program
print_false PROC
mov edx, OFFSET false_msg
call WriteString
jmp exit_program
exit_program PROC
ret
exit_program ENDP
main ENDP
END main
can you fixed bilow problem
Output
Show output from: Build
1>------- Build started: Project: Project, Configuration: Debug|Win32--.-.--
1> Assembling AddTwo.asm...
1>D:\Project32_VS2022\Project32_VS2022\AddTwo.asm(105): fatal error A1010: unmatched block nesting : main ========== Build: 0 succeeded, 1| failed, 0 up-to-date, 0 skipped ==========
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago