小编jak*_*ist的帖子

有人可以解释这段代码

这个代码用于反转字符串

.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword

.data
source  BYTE  "This is the source string",0
target  BYTE  SIZEOF source DUP('#')
 .code
 main PROC
; Point ESI to the last character in the source string:
    mov  esi,OFFSET target - 2

; Point EDI to the beginning of the target string:
; We do not copy the null terminator byte.

mov  edi,OFFSET target
mov  ecx,SIZEOF source-1        ; loop counter

L1: mov  al,[esi]                   ; get a character from source
    mov  [edi],al                   ; …
Run Code Online (Sandbox Code Playgroud)

string assembly reverse

1
推荐指数
1
解决办法
434
查看次数

标签 统计

assembly ×1

reverse ×1

string ×1