Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

still in the code there are problem INCLUDE Irvine 3 2 . inc Output Show output from: Build 1 > - - - - -

still in the code there are problem
INCLUDE Irvine32.inc
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(94): error A2008: syntax error : ENDP
1>D:\Project32_VS2022\Project32_VS2022\AddTwo.asm(95): error A2008: syntax error : ENDP
1>D: \Project32_VS2022\Project32_VS2022\AddTwo.asm(96): error A2088: END directive required at end of file
1>D: \Project32_VS2022\Project32_VS2022\AddTwo.asm(96): fatal error A1010: unmatched block nesting : exit_progra ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
.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
ENDP main
ENDP
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

Students also viewed these Databases questions