225k views
4 votes
Which of the following string primitives will modify the esi register? check all that apply. group of answer choices

-scasb l
-odsb
-cmpsb
-movsb
-stosb

User Sangimed
by
8.9k points

1 Answer

2 votes

Final answer:

The string primitives modifying the ESI register are SCASB, LODSB, CMPSB, and MOVS; STOSB does not affect ESI.

Step-by-step explanation:

The string primitives that will modify the ESI register are SCASB, LODSB, CMPSB, and MOVS but STOSB will not. Here is the step-by-step explanation:

  • SCASB (Scan String Byte) modifies ESI by incrementing or decrementing it, depending on the Direction Flag (DF).
  • LODSB (Load String Byte) also increments or decrements ESI based on the DF.
  • CMPSB (Compare String Bytes) compares two strings and also updates the ESI register in the same manner.
  • MOVS (Move String Byte) moves data from one string to another, affecting both the ESI and EDI registers.
  • STOSB (Store String Byte) write data to a string pointed by EDI, so it does not modify ESI.

User Ruaridhw
by
8.4k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.