编程与软件工程skilldrick.github.io
轻松学 6502
Easy 6502
2013 — 2025,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Easy 6502 是一个面向初学者的 6502 汇编语言互动教程,可在浏览器里边写边运行简单程序。它从寄存器、寻址方式和基本指令讲起,用循序渐进的小例子带读者理解早期微型计算机的底层编程。页面轻量,适合作为学习汇编和计算机体系结构的第一站。
为什么经久不衰:6502 指令集小而完整,又是 Apple II、Commodore 等经典机器的核心;这份教程把“底层”变得可动手,所以多年后仍值得读。
HN 评论精选
6502 极其精简,与 x86 文档的庞杂形成鲜明对比。
最近在 r/ReverseEngineering 上有人指出,6502 的晶体管数量比 Intel x86 文档的页数还少。讨论链接:http://www.reddit.com/r/ReverseEngineering/comments/1lp61a/intel_x86_documentation_has_more_pages_than_the/
lclarkmichalek查看英文原文
It emerged recently on r/ReverseEngineering that the 6502 has fewer transistors than the number of pages in Intel's x86 documentation. Link to the discussion: http://www.reddit.com/r/ReverseEngineering/comments/1lp61a/intel_x86_documentation_has_more_pages_than_the/
6502 简单到能让人记住操作码,也足以支撑起模拟器和怀旧项目。
太喜欢了!6502 是我学过的第一种汇编;大量手工汇编让我至今记得若干操作码(a9 44、20 ed fd……60)。大约一年前,我出于怀旧用 JavaScript 写了一个 Apple II 模拟器,其中的 6502 模拟器还不完美,但能跑大多数程序。
__david__查看英文原文
Love it! The 6502 was the first assembly I ever learned. I still remember a handful of opcodes from all the hand-assembling I did: a9 44 20 ed fd a9 41 20 ed fd a9 56 20 ed fd a9 49 20 ed fd a9 44 20 ed fd 60 About a year ago, in a fit of nostalgia, I wrote an Apple ][ emulator in javascript [1]. My 6502 emulator isn't quite perfect yet, but it runs most things. [1] http://porkrind.org/a2
手工汇编和背操作码的经历虽已过去,却带来了宝贵的底层视角。
对足够简单的指令集,人们背下实际操作码并不罕见。学校里从终端过渡到微型计算机时,我朋友走到新的 Commodore 6502 机器前,直接在监控程序里用十六进制输入了一个简单程序。我曾因项目板没有汇编器而记住了 RCA 1802 的常用操作码:在纸上写汇编,手工汇编成操作码,再键入。回不去那些日子,我也不想回去,但我忍不住觉得自己很幸运,因为那段经历给了我知识和视角。
dwc查看英文原文
> Assembly language is the lowest level of abstraction in computers - the point at which the code is still readable. For simple enough instruction sets it was not unheard of that people memorized the actual opcodes. In school, at the transition from terminals to micros, a friend of mine walked up to one of the new Commodore 6502 machines and entered a simple program in hex directly into the monitor program. For a while I had the common opcodes for the RCA 1802 memorized, due to working with a project board without an assembler (writing assembly on paper, then hand assembling into opcodes, then keying in the opcodes). There's no returning to those days and I wouldn't if I could, but I can't help but think that I was lucky to have experienced that for the knowledge and perspective.
6502 简单到可以手工汇编,现代 AVR 指令集也有类似的可亲近性。
我的第一份真正工作是为一个商人用 BASIC 编程 Commodore PET。当需要更快搜索时,我用 6502 汇编写了一个例程。不幸的是我没有汇编器,只能照着书后指令表手工汇编;我的“加载器”是一段 BASIC 代码,用 POKE 把数字写进内存。可以确认 6502 指令集令人愉快地简单。另一方面,现代 CPU 上也能有类似体验;我发现 Atmel AVR(Arduino 和 Raspberry Pi 里的)指令集同样平易近人。
Elrac查看英文原文
My first real job was programming a Commodore PET for a merchant - in BASIC. When I needed searches to be faster I wrote a routine in 6502 assembler. Unfortunately I didn't have an assembler, so I hand-assembled my code using the instruction code chart from the back of a book. My "loader" was a chunk of BASIC code POKEing numbers into memory. Can confirm that the 6502 instruction set is pleasantly simple. On the other hand, a similar experience can be had on some modern CPUs as well. I found the Atmel AVR's instruction set (as found in the Arduino and Raspberry Pi) to be similarly approachable.
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选