x86汇编-从用户输入连接两个字符串

时间:2018-11-24 01:28:19

标签: assembly x86 concatenation

我遇到了以下问题:将S1和S2连接到一个新的字符串S中。我不知道该怎么做,也没有找到任何有用的在线方法。到目前为止,我的代码提示用户输入2个句子并从键盘上读取字符串。该代码有效。到目前为止,这是我的代码:

S1 BYTE "Please enter the first sentence:", 0
S2 BYTE "Please enter the second sentence:", 0
buffer BYTE 21 DUP(?)
byteCount DWORD ?

mov edx, OFFSET S1
call WriteString

mov edx, OFFSET buffer
mov ecx, SIZEOF buffer
call ReadString
mov byteCount, eax

mov edx, OFFSET S2
call WriteString

mov edx, OFFSET buffer
mov ecx, SIZEOF buffer
call ReadString
mov byteCount, eax

;How do I concatenate the 2 strings?

0 个答案:

没有答案