banner



What Is A Single Instruction That Clears Bits 0, 3, And 4 In The Al Register?

two Answers 2

The play a joke on here is to do the following:

  1. apply an OR instruction to prepare bits 0, 3, 4 and 7

  2. utilize an XOR instruction to complement bits 0, 1, 5 and 7

Note that $.25 0 and seven first go set in (ane) and so cleared in (2).

I'll get out the bodily asm instructions to you, since this is your homework, afterward all.

answered Apr 27, 2010 at 5:16

user avatar

3

  • Give thanks you Mr.Paul. This should be the code: OR AL, 10011001 XOR AL, 10100011

    Apr 27, 2010 at xi:08

  • @Nick: yeah, that looks about right, depending on exactly what CPU and assembler you're using.

    Apr 27, 2010 at 11:55

One DB didactics defining an assortment of 256 "result" values, and one motion teaching to move an element of this array into al, using the electric current value in al as an index.

Wouldn't that work ?

Information technology might even be argued that this is in fact even a single-pedagogy solution, since the DB is non really an pedagogy that executes at run-time, rather it is a compile-fourth dimension declarative.

answered April 26, 2010 at eighteen:27

user avatar

1

  • He's proposing a lookup tabular array with a result value for each of the 256 possible input values. The list is created using the DB command. Lookup is performed using a simple motility AL, starting time + alphabetize instruction.

    May 2, 2010 at 14:14

Not the answer yous're looking for? Browse other questions tagged assembly x86 xor masm or ask your own question.

Source: https://stackoverflow.com/questions/2715754/write-a-maximum-of-two-instructions-to-clear-set-and-complement-some-bits-in-th

Posted by: stephenstinat1986.blogspot.com

0 Response to "What Is A Single Instruction That Clears Bits 0, 3, And 4 In The Al Register?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel