“数组”是如何实现的?在汇编中工作/如何在asm中分配内存块?
我目前正在学习使用 MASM(和 VS)进行 x86-64 汇编的基础知识。当我想要一块 5 字节大的内存块时,我可以这样做:
.data
myVar byte 1, 2, 3, 4, 5
但是,如何获得一块 n
bytes
(或 qwords< /code>) long 而无需在变量定义中手动输入 n 个数字(在本例中为
1, 2, 3, 4, 5
)?
I am currently learning the basics of x86-64 assembly with MASM (and VS). When I want a block of memory thats 5 bytes big I can just do:
.data
myVar byte 1, 2, 3, 4, 5
However how do I get a block of memory that is n
bytes
(or qwords
) long without having to manually type n numbers in the variable definition (in this case 1, 2, 3, 4, 5
)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

谢谢@Jester,你回答了我的问题。这有效:
Thank you @Jester, you answered my question. This works: