Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(How to fix this Assembly Language code) **The Assignment is below the code ----------------------------------------------------------------------- INCLUDE Irvine32.inc .data ctable byte '1' dword Proce1 size = ($

(How to fix this Assembly Language code)

**The Assignment is below the code

-----------------------------------------------------------------------

INCLUDE Irvine32.inc

.data ctable byte '1' dword Proce1 size = ($ - ctable ) byte '2' dword Proce2 byte '3' dword Proce3 byte '4' dword Proce4 byte '5' dword Proce5 numberOfEn = 5 message123 byte "Assembly program language",0dh,0ah byte "calculator",0dh,0ah byte "perform operation",0dh,0ah byte "choose by the user.",0dh,0ah,0 msgpro byte "-------------------------------------",0dh,0ah byte " 32-Bit Boolean Calc" ,0dh,0ah byte "-------------------------------------",0dh,0ah byte "1. x AND y" ,0dh,0ah byte "2. x OR y" ,0dh,0ah byte "3. NOT x" ,0dh,0ah byte "4. x XOR y" ,0dh,0ah byte "5. Exit Program",0dh,0ah byte "-------------------------------------",0dh,0ah byte "enter choice : ",0

message1 byte " (x AND y) operation",0dh,0ah,0 message2 byte " (x OR y) operation",0dh,0ah,0 message3 byte " (NOT x) operation",0dh,0ah,0 message4 byte " (x XOR y) operation",0dh,0ah,0 message5 byte " (Exit Program)",0dh,0ah,0

.code main PROC

mov edx,OFFSET message123

call Write_String call Crlf call WaitMessage call Clrscr call Menu

ExitProg::exit

main ENDP

Menu PROC1

mov edx,OFFSET msgpro call Write_String call ReadChar mov ebx,OFFSET ctable mov ecx,numberOfEn

Loop1: cmp al,[ebx] jne Loop2 call NEAR PTR [ebx + 1] call Write_String call Crlf call WaitMessage call Clrscr jmp Loop3

Loop2: add ebx,5 loop Loop1

Loop3: jmp Menu

Menu EndP

Proce1 PROC1

mov edx,OFFSET message1 call Crlf call Crlf ret Proce1 ENDP

Proce2 PROC1

mov edx,OFFSET message2 call Crlf call Crlf ret Proce2 ENDP

Proce3 PROC1

mov edx,OFFSET message3 call Crlf call Crlf ret Proce3 ENDP

Proce4 PROC1

mov edx,OFFSET message4 call Crlf call Crlf ret Proce4 ENDP

Proce5 PROC1

mov edx,OFFSET message5 call Crlf call Crlf call Write_String call Crlf stc jc ExitProg Proce5 ENDP

END main

------------------------The assignment is as following-----------------------

image text in transcribed

Boolean Calculator Create a program that functions as a simple Boolean calculator for 32 bit integers. It should display a menu that asks the user to make a selection from the following list: 1. x AND y 2. x OR y 3. NOT x 4. x XOR y 5. Exit the program The program should run in a loop. When the user makes a choice, call a procedure called ChooseProcedure which invokes the appropriate procedure to perform the logical operation as outlined below AND op Prompt the user for two hexadecimal integers. AND them together and displays the result in hexadecimal OR op: Prompt the user for two hexadecimal integers. OR them together and displays the result in hexadecimal. NOT op Prompt the user for a hexadecimal intege NOT the integer r and displays the result in hexadecimal. XOR op Prompt the user for two hexadecimal integers XOR them together and displays the result in hexadecimal. Error checkin Your program should check for valid menu selection. In case of invalid selection it will do nothing but will continue waiting for input. Boolean Calculator Create a program that functions as a simple Boolean calculator for 32 bit integers. It should display a menu that asks the user to make a selection from the following list: 1. x AND y 2. x OR y 3. NOT x 4. x XOR y 5. Exit the program The program should run in a loop. When the user makes a choice, call a procedure called ChooseProcedure which invokes the appropriate procedure to perform the logical operation as outlined below AND op Prompt the user for two hexadecimal integers. AND them together and displays the result in hexadecimal OR op: Prompt the user for two hexadecimal integers. OR them together and displays the result in hexadecimal. NOT op Prompt the user for a hexadecimal intege NOT the integer r and displays the result in hexadecimal. XOR op Prompt the user for two hexadecimal integers XOR them together and displays the result in hexadecimal. Error checkin Your program should check for valid menu selection. In case of invalid selection it will do nothing but will continue waiting for input

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago