Drip homework (6-10)

Dripping 2015-01-19

This section Exercise:
1, skilled remember the location of CF / PF / AF / ZF / SF / OF of

  Skip
2, assembler instruction is written only affect the value of CF bit (does not affect other flags)

  MOV AX,0FF00

  ADD AX,101

3, write assembler instruction only affects the value of the PF position (not affect other flags)

  mov eax,3

  add eax,0

4, assembler instruction is written only affect the value of the AF bit (not affect other flag bits)

  mov ax,0ff

  add ax,2

5, only affect the assembler instruction is written bit value SF (not affect other flag bits)

  mov al, 80

  add al, 1

6, write assembler instruction only affects the value OF-bit (can not affect other flags)


7, respectively, for moving MOVS instruction 5 bytes, five words, double words 5

  MOVs BYTE PTR ES: [EDI], BYTE PTR DS: [ESI]

  MOVs BYTE PTR ES: [EDI], BYTE PTR DS: [ESI]

  MOVs BYTE PTR ES: [EDI], BYTE PTR DS: [ESI]

  MOVs BYTE PTR ES: [EDI], BYTE PTR DS: [ESI]

  MOVs BYTE PTR ES: [EDI], BYTE PTR DS: [ESI]

 

  MOVs ES WORD PTR [EDI], BYTE PTR DS: [ESI]

  .........

  MOVs DWORD PTR ES: [EDI], BYTE PTR DS: [ESI]

  ........

8, respectively, with instructions stored STOS 5 bytes, five words, double words 5

  HESE BYTE PTR ES: [EDI]

  ....

  ES stosic WORD PTR [EDI]

  ...

  DWORD PTR ES faro [EDI]

  .....
9, using 7,8 REP instruction to rewrite the title

  mov eax,5

  BYTE PTR ES REP faro [EDI]

  mov eax,5

  ES REP stosic WORD PTR [EDI]

  mov eax, 5
    REP stosic DWORD PTR ES: [EDI]

 

  mov eax, 5
     REP MOVs BYTE PTR ES: [EDI], BYTE PTR DS: [ESI]

  mov eax, 5
     REP MOVs ES WORD PTR [EDI], BYTE PTR DS: [ESI]

  mov eax, 5
     REP MOVs DWORD PTR ES: [EDI], BYTE PTR DS: [ESI]

 

Dripping 2015-01-20

Dripping 2015-01-21

Dripping 2015-01-22

Dripping 2015-01-23

Guess you like

Origin www.cnblogs.com/binaryAnt/p/11165786.html