源 BYTE "This is the source string",0 目标 BYTE SIZEOF 源 DUP(0),0

source BYTE "This is the source string",0 target BYTE SIZEOF source DUP(0),0

SIZEOF指的是什么?它是指源的大小(lengthOf * TYPE 等于数组中的元素数 * 每个元素的大小)?另外,有人可以解释 DUP(0),0 吗?这是指程序集 x86 MASM。谢谢

SIZEOF 简单地表示 size of a type or structure

它指的是您在 SIZEOF 关键字之后放置的任何内容。

SIZEOF element     ; refers to a single element in the array.  
SIZEOF wholearray  ; sizeof(element) * number_of_elements_in_array.

因为它是在编译时解析的,所以它只有在数组大小是静态的情况下才有效。

The syntax for DUP is:

count DUP (initialvalue [[, initialvalue]]...)

10 DUP (0)        ; 10 zero's
2 DUP (3 DUP ("A"), "BC")  ; "AAABCAAABC"

首先你会得到一个重复次数,然后是关键字 DUP,然后是括号中要重复的内容的说明。
重复规范可能包含额外的 DUP 语句。