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.