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
Which of the following are benefits of designing a scalable system? Choose 3 options.
Svetllana [295]

Explanation:

ability to maintain a high level of service for costumers

users may never know when a sight has experienced tremendous growth

ability to respond to users volume issues more quickly

4 0
3 years ago
What is the energy conversion of solar water heaters?
Gelneren [198K]
A liquid-to-liquid heat exchanger uses a heat-transfer fluid that circulates through the solar collector, absorbs heat, and then flows through a heat exchanger to transfer its heat to water in a storage tank. Heat-transfer fluids, such as antifreeze, protect the solar collector from freezing in cold weather.
7 0
3 years ago
Jeremy is working with a team that is creating an application using attributes and associated methods. What type of programming
Ugo [173]
<span>object-oriented programming languages</span>
8 0
2 years ago
What is block chain?
LuckyWell [14K]

Answer:

Block Chain is a system of recording information that makes it difficult or impossible to change, hack, or cheat the system.

A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems on the blockchain.

Hope this helps.

x

6 0
2 years ago
Read 2 more answers
Write a Java method to delete a record from a B-tree of order n.
max2010maxim [7]

Answer:

Deleting a record on a B-tree consists of three main events:

- Searching the node where the key to be deleted exists

- Deleting the key

- Balancing the tree if required

Explanation:

q = NULL;

   p = tree;

   while (p) {

       i = nodesearch(p, key);

       q = p;

       if (i < used(p) -1 && key == k(p,i)) {

           found = TRUE;

           position = i;

           break;

       }

       p = son(p,i);

   }

   if (!found)

   else if (subtree(p)) {

         if (used(p) > ((n-1)/2)+1)

         delkey (p, position, key);

       else {

           replace (p, position, fsucc(p));

           p0 r1 p1 r2 p2 r3 ……. pn-1 rn-1 pn

           q = &fsucc(p);

           qpos = index of fsucc;

           if (used(rbrother(p)) > ((n-1)/2)+1)

               replace (q, qpos, sonsucc(q));

           else

               while (q && used(q) < (n-1)/2) {

                   concatenate(q, brother(q));

                   q = father(q);

               }

       }

   }

   else

   delkey(p, position, key);

}

6 0
2 years ago
Other questions:
  • When desktop publishing software can interact with another software program, the two are said to
    6·1 answer
  • 11. You should type _
    6·2 answers
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • Domain of (x+8)/(x(x+10))
    12·1 answer
  • PowerPoint provides a wide variety of predefined shapes that can add visual insert to a slide true or false
    10·2 answers
  • What is the analysis stage in System development life cycle?
    12·1 answer
  • VEE Physics 2006 E.C
    7·1 answer
  • (20points)
    6·1 answer
  • Can someone please give me timetable managment system with data structures in java?
    11·2 answers
  • What is a port?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!