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
KonstantinChe [14]
3 years ago
13

Look at the logic program below. Set a breakpoint after each commented instruction. You can also single step through the program

. Answer the questions in the program.
.data

sourceword:
.word 0xAB
wordmask:
.word 0xCF
operand:
.long 0xAA

.text

.globl _start

_start:
movw sourceword, %ax
movw %ax, %bx
xorw %cx, %cx
# What's in ax?
# What's in bx?
# What's in cx?

andw wordmask, %ax
# What's in ax?
orw wordmask, %bx
# What's in bx?
xorw wordmask, %cx
# What's in cx?

movl operand, %eax
movl %eax, %ebx
movl %eax, %ecx
# What's in eax?
# What's in ebx?
# What's in ecx?

shll $3,%eax
# What's in eax?

rorl $4,%ebx
# What's in ebx?

sarl %ecx
# Now what's in ecx?

done:
Computers and Technology
1 answer:
Goshia [24]3 years ago
5 0

Using programming knowledge, it is possible to use programming logic, we can differentiate and find the terms

<h3>Writing the code and understanding the programming logic:</h3>

<em>.data</em>

<em>sourceword:</em>

<em>.word 0xAB</em>

<em>wordmask:</em>

<em>.word 0xCF</em>

<em>operand:</em>

<em>.long 0xAA</em>

<em>.text</em>

<em>.globl _start</em>

<em>_start:</em>

<em>movw sourceword, %ax # ax=0x00AB ( move the word value of sourceword =0x00AB to ax register.)</em>

<em>movw %ax, %bx # bx=0x00AB ( copy the value of ax to bx register.)</em>

<em>xorw %cx, %cx # cx=0000 ( cx=cx XOR cx, that is clear cx register.)</em>

<em />

<em>andw wordmask, %ax # ax=0x008B ( ax=ax AND wordmask= 0x00AB AND 0x00CF= 0x008B)</em>

<em>orw wordmask, %bx # bx=0x00EF (bx=bx OR wordmask= 0x00AB OR 0x00CF= 0x00EF.)</em>

<em>xorw wordmask, %cx # cx=0x00CF (cx=cx XOR wordmask= 0x0000 XOR 0x00CF=0x00CF.)</em>

<em />

<em>movl operand, %eax # eax=0x000000AA. ( copy the 32-bit value of operand=0x000000AA to eax.)</em>

<em>movl %eax, %ebx # ebx=0x000000AA.( copy the value of eax to ebx.)</em>

<em>movl %eax, %ecx # ecx=0x000000AA. ( copy the value of eax to ecx.)</em>

<em />

<em>shll $3,%eax # eax=0x00000550. ( logical shift left of eax=0x000000AA by 3 bits.)</em>

<em />

<em># 0x000000AA=00000000000000000000000010101010</em>

<em />

<em># =>00000000000000000000010101010000=0x00000550.</em>

<em />

<em>rorl $4,%ebx # ebx=0xA000000A. (Rotate right ebx=0x000000AA by 4 bits.)</em>

<em />

<em># 0x000000AA=00000000000000000000000010101010</em>

<em />

<em>3 =>10100000000000000000000000001010= 0xA000000A.</em>

<em />

<em>sarl %ecx # here the count value to shift the bits not mentioned.</em>

<em />

<em># It is the arithmetic shift right instruction. the shifted left bits filled with MSB bit.</em>

See more about logic program at brainly.com/question/14970713

#SPJ1

You might be interested in
The goal of the ____ memory allocation algorithm is to find the smallest memory block into which a job will fit.
Pani-rosa [81]
The goal of the BEST-FIT memory allocation algorithm is to find the smallest memory block into which a job will fit.
5 0
2 years ago
Read 2 more answers
How many errors are in the following formula?
finlep [7]

there are about two errors in the formula


4 0
3 years ago
Java’s class Color has a constructor that takes three integers as parameters: the red, green, and blue components of the color
Tanzania [10]

Answer:

    public Balloon(){

          //Invokes the 2 argument constructor for balloon with relevant  

          //parameters

          this(10,new Color(135,206,250));

    }

Explanation:

class Balloon{

    //Private fields in the Balloon class

    private double radius = 0;

    private Color c = null;

    // Constructor with two arguments - radius and Color

    public Balloon(double radius,Color c){

         this.radius = radius;

         this.c = c;

    }

    // No argument constructor

    public Balloon(){

          //Invokes the 2 argument constructor for balloon with relevant  

          //parameters

          this(10,new Color(135,206,250));

    }

}

3 0
4 years ago
Samantha is looking for a lens that is lightweight and small, making it easy to transport. She doesn’t care about the lens being
irina1246 [14]

Answer:

The correct option is;

d. Prime

Explanation:

A prime lens is a unifocal, or fixed-focal-length lens and it is referred to as the opposite of a zoom lens

The maximum aperture of ranges from f2.8 to f1.2, which are fast and have a creamy rendering of light that are out of focus, and also provide crispy image details, by making the most use of the light available and provide distinct combination of foreground and background images in pictures that give a crisp and visually pleasing appearance.

7 0
3 years ago
Read 2 more answers
When an input file is opened, the read position is initially set to the first item in the file. question 13 options:
Rom4ik [11]
<span>A special value inside of an INPUT file that marks the position of the location of the next item that will be read from the file. When opened, the READ POSITION is initially set to the first item in the file, thus the Answer is True.</span>
4 0
3 years ago
Other questions:
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • Which of these sedimentary rocks is made of the largest particles?
    10·1 answer
  • Explain what a honeypot is. In your explanation, give at least one advantage and one disadvantage of deploying a honeypot on a c
    12·1 answer
  • 1. You are the network manager for a computer training center that allows students to bring their own laptops to class for learn
    5·1 answer
  • Cookies Are Us runs a series of 100 cookie stores across the Midwestern United States and central Canada. At the end of each day
    13·1 answer
  • Difference between array processor and vector processor​
    14·2 answers
  • How do I fix this stylesheet?
    14·1 answer
  • Help! What is this graph and what does it represent?
    12·1 answer
  • The Freeze Panes feature would be most helpful for which situation?
    6·1 answer
  • The traditional role of a manager is that of a(n):__________ a. encoder. b. sensegiver. c. communication champion. d. informatio
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!