阅读各种汇编语言的材料?

发布于 2024-12-01 16:23:59 字数 424 浏览 4 评论 0原文

这是一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回首观望 2024-12-08 16:23:59

x86 程序集:

x86 Assembly:

  • Here's a manual with more than 1400 pages and some exercises included, some chapters are focused on stuff like boolean algebra and system organization
  • Intel's documentation and manuals here, you shouldn't need this before a few years ;)
  • An optimization guide (quite advanced stuff)
  • Here you can find an assembler for developing win32 apps, both in console and in window. It also includes the windows SDK and a description of all win32 APIs
  • This seems to be a good GAS (GNU Assembler) manual if you're developing on linux
  • Some examples (windows)
追我者格杀勿论 2024-12-08 16:23:59

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

最后一个链接对于理解第一个指令等技巧至关重要:

-/Lisp interpreter 3-20-64, part 1
 000004                 4/
-/go
 000004         go,
 000004 764607          hlt+cla+cli+7-opr-opr

这可以用更少的混淆(但更少的语义信息)编写为:

opr 4607

或者用更多的语义(并且仍然更混淆)编写为:

hlt+cla+cli+clf+07-opr-opr-opr

但是因为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:

-/Lisp interpreter 3-20-64, part 1
 000004                 4/
-/go
 000004         go,
 000004 764607          hlt+cla+cli+7-opr-opr

This could have been written with less obfuscation (but less semantic info) as:

opr 4607

Or with more semantics (and still more obfuscated) as:

hlt+cla+cli+clf+07-opr-opr-opr

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文