源BYTE“这是源字符串",0目标BYTE SIZEOF源DUP(0),0 [英] source BYTE "This is the source string",0 target BYTE SIZEOF source DUP(0),0

查看:135
本文介绍了源BYTE“这是源字符串",0目标BYTE SIZEOF源DUP(0),0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

What is SIZEOF referring to? Is it referring to the size of the source (lengthOf * TYPE which is equal to number of elements in the array * the size of each element)? Also, can someone explain DUP(0),0? This is referring to Assembly x86 MASM. Thank you

推荐答案

SIZEOF仅表示类型或结构的大小.

它指的是您在SIZEOF关键字之后加上的任何内容.

It refers to whatever you put after the SIZEOF keyword.

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

因为它是在编译时解析的,所以只有在数组大小为静态时才起作用.

Because it is resolved at compile-time it will only work if the size of an array is static.

DUP的语法是:

The syntax for DUP is:

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

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

首先,您将获得重复计数,然后是关键字DUP,然后是要在括号中重复的内容的说明.
重复规范可能包括其他DUP语句.

First you get a repeat count, then the keyword DUP and then a specification of what to repeat in brackets.
The repeat spec may include additional DUP statements.

这篇关于源BYTE“这是源字符串",0目标BYTE SIZEOF源DUP(0),0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆