阅读各种汇编语言的材料?
这是一个 wiki 问题,旨在收集有用的参考资料,以学习各种架构的汇编语言。
我最近尝试阅读 1964 年的 Basic Pdp-1 Lisp 源代码,并且需要广泛搜索参考资料才能从代码中理解哪怕是最微小的意义。我觉得我收集的链接可能对任何试图阅读类似版本代码的人有用,例如 SpaceWar!
因此,一个好的答案应该包括:
- 架构的名称
- 汇编语言中的一个不平凡的程序
(这是问题的真正焦点:一个值得学习汇编才能阅读的经典程序。) - 用于理解程序的手册和指令参考资料
我将从我收集的用于阅读 Pdp-1 LISP 的参考资料开始。
This is a wiki question to gather useful references for learning assembly languages for various architectures.
I recently attempted to read the source code for Basic Pdp-1 Lisp from 1964, and needed to search extensively for reference materials to make even the slightest bit of sense from the code. I feel the links I've collected may prove useful to anyone attempting to read code of similar vintage, like SpaceWar!
So a good answer should comprise:
- The name of the architecture
- A non-trivial program in assembly language
(This is the real focus of the question: a classic program that's worth learning assembly in order to read it.) - Handbooks and instruction references for understanding the program
I'll start things off with my collected references for reading Pdp-1 LISP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
x86 程序集:
x86 Assembly:
Pdp-1 LISP
Pdf 源代码,包括解释性文章和符号列表:
http://www .google.com/url?sa=D&q=http://www.computerhistory.org/collections/accession/102650371
ASCII 源列表:
http://hack.org/mc/software/lisp.p2
一个很好的概述:
http://en.wikipedia.org/wiki/PDP-1
Pdp-1 手册,包括指令集参考:
http://www.bitsavers.org/pdf/dec/pdp1/F15B_PDP1_Handbook_1961.pdf
宏汇编器手册,描述了如何通过算术形成指令:
http://www.bitsavers.org/pdf/dec/pdp1/PDP -1_Macro.pdf
指令集的替代演示,说明了移位和操作指令的可组合性:
http://simh.trailing-edge.com/docs/architecture18b.pdf
最后一个链接对于理解第一个指令等技巧至关重要:
这可以用更少的混淆(但更少的语义信息)编写为:
或者用更多的语义(并且仍然更混淆)编写为:
但是因为
clf
==opr
这很愚蠢。60 年代汇编编程的最后一个重要资源是 Knuth,vol.1。 1(1 版或 2 版)。这解释了 pdp-1 代码表现出的一些更基本的自残行为。
Pdp-1 LISP
Pdf of Source including explanatory article, and symbol listings:
http://www.google.com/url?sa=D&q=http://www.computerhistory.org/collections/accession/102650371
An ASCII source listing:
http://hack.org/mc/software/lisp.p2
A nice overview:
http://en.wikipedia.org/wiki/PDP-1
Pdp-1 Handbook, including instruction set reference:
http://www.bitsavers.org/pdf/dec/pdp1/F15B_PDP1_Handbook_1961.pdf
Macro asembler manual, describing how instructions are formed by arithmetic:
http://www.bitsavers.org/pdf/dec/pdp1/PDP-1_Macro.pdf
Alternate presentation of instruction set illustrating composability of shift and operate instructions:
http://simh.trailing-edge.com/docs/architecture18b.pdf
This last link is vital for understanding such tricks as the very first instruction:
This could have been written with less obfuscation (but less semantic info) as:
Or with more semantics (and still more obfuscated) as:
But since
clf
==opr
that would be silly.One last crucial resource for 60s-era assembly programming is Knuth, vol. 1 (1ed or 2ed). This explains some of the more basic self-mutilations that pdp-1 code exhibits.