QUESTIONS Short Answer 1. 2, 3. Using STD before a repeat instruction ensures th
ID: 3584924 • Letter: Q
Question
QUESTIONS Short Answer 1. 2, 3. Using STD before a repeat instruction ensures that the characters will be read in order to repeat wnieLF s cear, you sould use the instruction, When executing string instructions, you must append a size identifier, which is similar to how instructions are written when assembling with 4. To work with characters 4 bytes in size you must append the character to a string primitive instruction 6. The data required to be stored in est and/or edi for string primitive instructions is 6. Repeating CMPS with REPZ rather than REP is necessary because REPZ will only repeat if ZF is 7. When using CMPSW, the address in edi will be incremented by 8. When repeating a string instruction, you must load the C register with the number of 9. ZF will equal 10. After executing SCAS, the most efficient way to proceed is to use the each iteration each iteration that SCAS does not find the target character. instruction which will execute the code branch for when the target character is not found. 11-Only one operand is implicitly used when calling STOS: 12. LODS copies the value reterenced byand stores it in 13. The instruction(s) is/are the instruction(s) that is/are typically called with one of the repeat instructions 14. Instead of using LEA when assembling with GAS, you can use the MOV instruction and prefix the variable with 15. Caling MOVS with REPZ or REPNZ could have unintended effects such as exiting early because MOVS does not modifyExplanation / Answer
1. Using STD before a repeat instruction ensures that the character will be read user input.
2. In order to repeat while ZF is clear, you should use string instruction.
3. When executing string instructions, you must append a size identifier, which is similar to how instruction are written when assembling with add, adds
4. To work with characters 4 bytes in size you must append the 2 byte character to a string primitive instruction
5. The data required to be stored in es/and/or edi for string primitives instructions is Move string data MOVSB, MOVSD, MOVSW.
6. Repeating CMPD with REPZ rather than REP is necessary because REPZ will only repeat if ZF is zero or it doesnt acquire initialization.
7. When using CMPSW, the address in edi will be incremented by DWORD each iteration
8. When repeating a string instruction, you must lead the C register with the number of power of 2.
9. ZF will equal REPNE each iteration that SCAS does not find the target character.
10. After executing SCAS, the most efficient way to proceed is to use the copy instruction, which will execute the code branch for when the target character is not found
11. Only one instruction is implicitly used when calling STOS: call.
12. LODS copies the value referenced by weak pointer and stores it in weak variable.
13. The STOP instruction(s) is/are the instruction(s) that is/are typically called with one of the repeat instructions
14. Instead of using LEA when assembling with GAS, you can use the MOV instruction and prefix the variable with %% instead of %.
15. Calling MOVS with REPZ or REPNZ could have unintended effects such as exiting early because does not modify the value of the register.