ActionScript ByteCode AVM2 中的堆栈、寄存器,都有哪些?
在 AVM2 概述 PDF 中,我遇到了对两种类型堆栈的引用 - 作用域堆栈和操作数堆栈。
1)我假设这是两个不同的内存堆栈,每个处理不同的事情。还有更多的堆栈吗?
2)pushstring“hello”——这会将“hello”字符串所在的内存地址的起始位置推送到操作数堆栈上。正确的?
3) setlocal 0 - 这将通过弹出堆栈(上面)中的值将其存储到寄存器0中。正确的?
4) PushScope() - 嗯,文档说弹出堆栈值,将值推入作用域堆栈。为什么?
我了解一点 NASM,但 ABC 似乎比这更复杂。特别是我对范围堆栈和多个堆栈的整个概念感到困惑。
From the AVM2 Overview PDF I encountered references to two types of stacks - Scope Stack and Operand Stack.
1) I assume these are two different memory stacks, each handling different things. Are there even more stacks?
2) pushstring "hello" - this would push a start of memory address where "hello" string is located onto Operand Stack. Right?
3) setlocal 0 - this would store a value from the stack (above) into register0 by popping it off. Right?
4) PushScope() - hmm, docs say pop value of stack, push value onto Scope Stack. Why?
I know a little bit of NASM but ABC seems more complex than that. Especially I'm confused about Scope Stack and the whole concept of multiple stacks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不是 AVM2 专家,但我所知道的是:
我强烈建议下载 Tamarin 源代码并在那里使用反编译器。此外,Yogda 看起来非常方便学习:http://www.yogda.com/
I am no AVM2 expert, but here's what I know:
I highly recommend downloading the Tamarin source and playing with the decompiler there. Also, Yogda looks to be pretty handy for learning: http://www.yogda.com/