1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MrRa [10]
3 years ago
14

Hello, this is a 2 part question for my beginning assembly class. Thank you in advance for your help

Computers and Technology
1 answer:
madam [21]3 years ago
3 0

Answer:

Complete code is given below:

Explanation:

INCLUDE Irvine32.inc

.data

msgMenu BYTE "---- Boolean Calculator ----", 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",0

msgAND      BYTE "Boolean AND",0

msgOR       BYTE "Boolean OR",0

msgNOT      BYTE "Boolean NOT",0

msgXOR      BYTE "Boolean XOR",0

msgOperand1 BYTE "Input the first 32-bit hexadecimal operand: ",0

msgOperand2 BYTE "Input the second 32-bit hexadecimal operand: ",0

msgResult   BYTE "The 32-bit hexadecimal result is:            ",0

caseTable   BYTE '1'     # lookup value

DWORD _AND_op        # address of the procedure

EntrySize = ($ - caseTable )

   BYTE '2'

   DWORD _OR_op

   BYTE '3'

   DWORD _NOT_op

   BYTE '4'

   DWORD _XOR_op

   BYTE '5'

   DWORD _ExitProgram

NumberOfEntries=($ - caseTable)/EntrySize

.code

main08stub PROC

   call Clrscr

Menu:

   mov edx, OFFSET msgMenu # menu choices

   call WriteString

   call Crlf

L1: call ReadChar

   cmp al, '5' # is selection valid (1-5)?

   ja L1   # if above 5, go back

   cmp al, '1'

   jb L1   # if below 1, go back

   call Crlf

   call **BLANK**

   jc quit # if CF = 1 exit

   call Crlf

   jmp Menu    # display menu again

quit: exit

main08stub ENDP

#----------------------------------------

**BLANK** PROC

#

# It selects a procedure from the case table

# Receives: AL = number of procedure

# Returns: nothing

#-----------------------------------

   ret

**BLANK** ENDP

#------------------------------------------------

_AND_op PROC

#

# Performs a boolean AND operation

# Receives: Nothing

# Returns: Nothing

#------------------------------------------------

   ret

_AND_op ENDP

#------------------------------------------------

_OR_op PROC

#

# Performs a boolean OR operation

# Receives: Nothing

# Returns: Nothing

#------------------------------------------------

   ret

_OR_op ENDP

#------------------------------------------------

_NOT_op PROC

#

# Performs a boolean NOT operation.

# Receives: Nothing

# Returns: Nothing

#------------------------------------------------

   ret

_NOT_op ENDP

#------------------------------------------------

_XOR_op PROC

#

#

# Performs an Exclusive-OR operation

# Receives: Nothing

# Returns: Nothing

#------------------------------------------------

   ret

_XOR_op ENDP

#------------------------------------------------

_ExitProgram PROC

#

# Receives: Nothing

# Returns: Sets CF = 1 to signal end of program

#------------------------------------------------

   ret

_ExitProgram ENDP

END main08stub

You might be interested in
What should be used to screw on broadheads? needle-nose pliers gloves thumb and forefinger only specially designed wrench
strojnjashka [21]
You should use needle-nose pliers, or sometimes even specially designed wrenches to screw on broadheads. 
3 0
2 years ago
What permission do users have by default regarding printer access and the ability to manage documents?
Gnesinka [82]
<span>You can view documents across all print queues and print devices.

</span>
8 0
2 years ago
George enters the types of gases and the amount of gases emitted in two columns of an Excel sheet. Based on this data he creates
Alex777 [14]

Answer:

data source

Explanation:

The main aim of a data source is for the gathering of all necessary information that is needed to access a data. Since he has used the information to create a pie chart, this means that some data were used for the creation of this pie chart. Hence the information used for the creation of the pie chart is the data source for the information illustrated on the pie chart.

3 0
3 years ago
True or False? At any point in time, an open file has a current file pointer indicating the place where the next read or write o
mr_godi [17]

Answer:

True is the correct answer for the above question.

Explanation:

  • When any document file is opened then every point has some particular address. so there is a pointer which states that where the read operation and the write operation is going on.
  • When any person writes any program to read a file or write a file then there is a need for some variable that is pointed for the reading and the write operation.
  • The document which is used for the write data or read data is also designed and maintained by some software.
  • Hence we can say that there are needs of some variable that point the operation of the file and it is also stated from the above question. Hence the above question statement is a true statement.
5 0
3 years ago
Which line in the following program will cause a compiler error?
Viktor [21]

Answer:

The answer is "Option A".

Explanation:  

  • In the given C++ Language program on line 8 compile-time error will occur, because in the code the conditional statement is used. In if block, we check two conditions together, which is the number variable value is greater than equal to 0 and check less than equal to 100.  
  • In this condition statement, a AND operator is used that execute when both condition is true, but in the last condition, we do not define a variable name that, checks value. That's why the program will give an error on line 8.
3 0
3 years ago
Other questions:
  • Using ajax technologies and apis, websites and applications can pull information from a variety of sources in order to create __
    8·1 answer
  • To execute a prepared SQL statement, you can use the _______ and execute methods of the PDOStatement object to set parameter val
    9·1 answer
  • Which address correctly represents one that is composed of two halves, one assigned to a network adapter manufacturer, and the o
    6·1 answer
  • What is an enterprise system
    14·2 answers
  • All nuclear energy results in the rapid release of energy, such as in atomic bombs. true or false
    8·1 answer
  • How many transponders are contained within a typical satellite?
    12·1 answer
  • You are an IT technician at your company. The company has two small offices in different cities. The company's head office conta
    5·1 answer
  • Many companies use telephone numbers like 555-GET-Food so the number is easier for their customers to remember. On a standard te
    6·2 answers
  • The blue section of the following Venn diagram could represent which of the following Boolean statements?
    14·1 answer
  • Which of these is an example of collective voice?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!