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]
2 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]2 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
Henry is designing a document for his architecture project. In which order should Henry preform the different tasks that are req
nadezda [96]

It is

Select an appropriate layout

Decide which current format...

Import or compose...

Proofread...

Check the print preview..

4 0
3 years ago
The best way to help people in the contemplation stage of change is to:
Lelechka [254]

Answer:

D. Point out the negative consequences of the behavior, so they see that the negative aspects do outweigh the positive aspects​

Explanation:

7 0
2 years ago
Read 2 more answers
You may declare an unlimited number of variables in a statement as long as the variables are ____.
k0ka [10]

Answer:

b. the same data type

Explanation:

Any number of variables can be declared in a statement as long as the variables have the same data type. For example:

1) int a,b,c,d,e;

Here each of the declared variables a,b,c,d,e have the type int.

2) char p,q,r,s,t,u,v,w;

In this case variables p to w all have the type char.

3) float x,y,z;

x,y and z are all of type float.

6 0
3 years ago
قواعد البيانات الموزعه​
Monica [59]

Answer:

Translation : Distributed Databases

Explanation:

6 0
3 years ago
In an all-integer linear program,
xenn [34]

Answer: E

All decision variables must be integer

Explanation:

The integer-linear program is a program in which the objective function and any constraints are all linear ie all of the variables are restricted to be integers.

A linear program is Np complete. Also every decision variable appear in any constraints must also appear in the objective function, possibly with zero coefficient if needed.

8 0
3 years ago
Other questions:
  • how can you create fades with the smart tool? How can you specify the types of fade curves that are used with the smart tool?
    13·1 answer
  • How are modern computers different from eniac?
    5·1 answer
  • A cybersecurity analyst is currently investigating a server outage. The analyst has discovered the following value was entered f
    9·1 answer
  • The Software Engineering Code of Ethics and Professional Practice was developed by Select one: a. Computer Professionals for Soc
    7·1 answer
  • All of the following are organization habits except:
    10·1 answer
  • The engineering firm you work for is submitting a proposal to create an amphitheater at a state park. Proposals must be submitte
    15·1 answer
  • Write a method so that the main() code below can be replaced by simpler code that calls method calcMilesTraveled(). Original mai
    11·1 answer
  • What is a functional organisation? and how it functions​?
    12·1 answer
  • You are a visitor at a political convention with delegates; each delegate is a member of exactly one political party. It is impo
    14·1 answer
  • 1.erros can easily be ____ 2.work is done in an ____ no mess environment 3.colors do not _____ and brushes are never ______ 4.st
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!