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 would be the total width of the div in the code below?
Artyom0805 [142]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is d- 346px.

The complete code of this example is given below:

<div>

style="margin:20px; border:solid 3px #888888;">

</div>

while the image width is 300px.

It is noted that the image width is 300px and the margin is 20 px.

Margin:20px means that image margin from four side is 20 px each.

So the width of dive from both side increase to 40 px and the image has 300 px, then total width becomes 340px. Now the border also has 3px of four sides of the image, then the width of the border becomes 6px.

so the total width of the div tag is 346 px.

In short, we can calculate the width of tag as below:

total width of div= width of image+ width of margin+ width of border

total width of dive= 300px+40px+6px

total width of div=346px.

4 0
2 years ago
Read 2 more answers
Describe how a black and white image could be represented in binary
SIZIF [17.4K]

Answer:

Each pixel in an image is made up of binary numbers. If we say that 1 is black (or on) and 0 is white (or off), then a simple black and white picture can be created using binary. To create the picture, a grid can be set out and the squares coloured (1 – black and 0 – white).

5 0
3 years ago
Read 2 more answers
I need help with these
solmaris [256]

Answer:

Choose internet is the right answer

7 0
2 years ago
In the context of a manager's roles, a _____ is an informational role that involves seeking and receiving information, scanning
Marina CMI [18]

Answer: Monitor

Explanation: Monitor role is the role played by the person in the management that processes the information.The role has the responsibility of the seeking data and records of the organization.

Organizing or managing ,scanning the data that is seeked and accordingly changes are made is the function of the monitor. Monitors also examines the productivity and the processing in the management.

5 0
3 years ago
Assign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than on
podryga [215]

Answer:

#include <iostream>

using namespace std;

int main()

{

   string s;

   cin>>s;    //reading string

   int i,j;

   bool has_dups=false;

   int n= s.length();

   for(i=0;i<n;i++)  //to check for duplicate characters

   {

       for(j=0;j<n;j++)

       {

           if(j!=i && s[i]==s[j])  //to check if it is matched with itself

           {

               has_dups=true;  //if true no need to check others

               break;

           }

       }

   }

   cout<<has_dups;

   return 0;

}

OUTPUT :

California

1

Explanation:

Above program finds if a character repeat itself in the string entered by user.

4 0
2 years ago
Other questions:
  • Janice has a "jammed" key on her keyboard. Every time she strikes the "S" key it sticks and doesn't pop back. What should Janice
    6·2 answers
  • PLEASE  HELPPPP!!!!!
    14·1 answer
  • You want to make it possible for your smartphone to share its internet access wirelessly with your friends device which of the f
    10·1 answer
  • If Nancy receives an encrypted message from Matthew, which key does she use to read it? Nancy’s private key Nancy’s public key M
    8·1 answer
  • Which statement best describes antivirus software?
    13·1 answer
  • How many sets of number do both Hex and RGB values have?
    10·1 answer
  • Anyone has any ideas for a gaming setup i can buy for christmas. Something with high framing rates (monitor included) for about
    15·1 answer
  • PLEASE HELP I HAVE A TEST RIGHT NOW!!!
    13·1 answer
  • True or False: Once you rename a field, the new field name must be used in the rest of the search string.
    7·1 answer
  • Writing queries in sql to compile data from a database is related to the physical level of databases true or false?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!