TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The 6502 microprocessor is 35 years old as of September 16th

66 点作者 pietrofmaggi超过 14 年前

15 条评论

chrisb超过 14 年前
Ah, memories, memories.<p>The BBC micro model B was the first ever computer I programmed, at the tender age of 8 or 9. My dad was (still is, in fact) working in the computing department at a university all those years ago and managed to get us all kinds of nice little extras.<p>Like duel floppy drives - no tapes for me! And I didn't even realise how lucky I was until I visited a friend and we spend 20 minutes loading a game from tape. And visited another friend who saved some of his work to tape, only for the tape to get corrupted somehow, so it never loaded again.<p>Like sideways RAM. I always thought it was called this because it plugged sideways into the motherboard, but apparent this is not so: <a href="http://en.wikipedia.org/wiki/Sideways_address_space" rel="nofollow">http://en.wikipedia.org/wiki/Sideways_address_space</a>. This supported an extra 16kB (I think) of memory, and allowed us to run a complete word processor, and my dad used a Pascal compiler - which took up to half an hour to compile his code! I remember him setting it going over dinner... But it used to die on the first compile error found, which did tend to slow things down even more. And we had a daisy-wheel printer, which gave fantastic quality so long as you only required one font at a single size.<p>Then, a couple of years later, we got a 6502 co-processor connected via the 'tube' (<a href="http://en.wikipedia.org/wiki/Tube_%28BBC_Micro%29" rel="nofollow">http://en.wikipedia.org/wiki/Tube_%28BBC_Micro%29</a>) - an expansion port on the BBC micro. This more than doubled the memory, and ran faster. But various optimizations didn't work. You could no longer write directly to screen address-space, as this was still in the hosts address-space, whereas user programs now executed in the co-processors address space. But, excitingly, there were API calls that allowed you to read/write to/from memory in the host system, so I wrote a (very simple) windowing system that stored the graphics contents beneath each window in the host memory, while executing on the co-processor.<p>The most ambitious programme I ever wrote was a sideways scrolling shooter game, which was written almost entirely in assembly, and could have up to 50 moving sprites on the screen at the same time without dropping frame-rate. Sadly I never fully completed it, as my dad had just got his first PC at the time and I moved over fairly quickly.<p>And of course, no discussion of the BBC is complete without mentioning Elite, which was a truely awesome game. They completely re-implemented line drawing routines, as the inbuilt ones weren't fast enough. And they used two screen modes _at the same time_ to allow high definition at the top of the screen, but only in black and white; and lower definition, but in colour, at the bottom of the screen. Try doing _that_ on a PC!<p>Sigh... Wonderful times... And all in less than 32kB of memory...
评论 #1701488 未加载
评论 #1701003 未加载
评论 #1700637 未加载
评论 #1701068 未加载
DiabloD3超过 14 年前
Don't forget what the 6502 was in. The NES used it, the Apple II used it, and the C64, and a few early arcade games, and the early Ataris. The SNES used the 16 bit variant of it called the 65C816, as did the Apple IIGS.<p>Interesting side note: The Apple IIGS could run normal Apple II 8bit software and GS-only 16bit software... Nintendo had planned the same for the SNES, but bailed on the idea early on, afraid of the backwards compatibility cannibalizing SNES game sales.<p>Sony, who was an important part of designing the SNES, produced the SPC700 sound DSP (which had a 6502-like instruction set, its own RAM, and a normal DSP companion core to do mixing, panning, volume, and filtering).<p>Incidentally, Sony had a working prototype for a add-on CD drive for the SNES (it used the expansion port on the bottom most people didn't know existed, and the SNES would sit on the drive). The drive also included a secondary independent 65C816, sorta like SA-1 chip used in Super Mario RPG (which ran 3x faster, had its own RAM, could MMIO and DMA to hardware in the SNES and interrupt the main CPU to do so).<p>By the time Sony was ready to ship the device with Nintendo, the SegaCD add-on for the Genesis had already crashed and burned, and Nintendo decided to back out because they thought CDs had no future for gaming.<p>Sony decided to make their own console, replacing the Super Nintendo "component" of their CD add-on, and produced the Playstation. The Playstation sound chip was similar to the SPC700 (but vastly enhanced for CD quality audio), but the rest of the Playstation was decidedly not like a SNES.<p>Sony, during the development of the Playstation 2, decided to add backwards compatibility as a feature when Nintendo didn't.
mahmud超过 14 年前
My first language that wasn't. I taught myself 6502 asm before I have even seen it run. The local British Council library (UK sponsored library going back to colonial times) had 3-5 books on computer programming, all of which I memorized. Among those books was one on the BBC Micro assembly programming.<p>It had a few worked examples. I used to cover the examples with a sheet, read the problem, then try to solve them before looking at the answer (since I didn't have a physical machine to test things.) -- I quickly came to appreciate that there was no canonical single "answer" in algorithms, and the only way to compare the "equality" of two solutions is see they leave the machine in the same state, given identical initial configurations .. very disturbing thoughts for a self-taught newbie programmer.<p>I did that for a few weeks and was bored. Then got Robert Lafore's book "Assembly Language Programming for the IBM PC and XT", and I <i>killed</i> it. Hard to explain this, but my first working assembly programs were quite advanced, because I have been "paper hacking" for quite some time by then. I wrote my first apps off of a floppy disk that I used to insert into internet cafe or library computers, when no one was looking (I didn't do any of the PC speaker tricks until much later, when I got my own computer.)
评论 #1701269 未加载
评论 #1701190 未加载
pietrofmaggi超过 14 年前
After all these years the 6502 (in his reincarnations) it's still alive, selling million of pieces (but at 200MHz). <a href="http://www.westerndesigncenter.com/wdc/index.cfm" rel="nofollow">http://www.westerndesigncenter.com/wdc/index.cfm</a>
评论 #1700983 未加载
rman666超过 14 年前
In 1979, at age 16, I saved money from my paper route and purchased my first computer, an Ohio Scientific (OSI) C2-4P, from Allied Electronics in West Allis, Wisconsin. It had a 6502 microprocessor and 4K(!) of RAM. I used a cassette tape recorder for mass storage (transfer rate was 300 baud), and an RF converter and a television set as my video monitor. This provided a stunning monochrome 80×40 character display!<p>Within a few months I grew tired of the 15+ minutes it took to load BASIC into RAM from cassette and decided to learn assembly language. This was better since there was a "monitor" program in ROM and therefore always available immediately.<p>Today, I flip-flop back and forth between thinking, "Those were the days!" and "How could 30 years have gone by so quickly?"
评论 #1701433 未加载
jeffbarr超过 14 年前
As it does for many others, news of this chip brings back fond memories.<p>I was hired for my first programming job at the age of 19 and was tasked with writing a macro assembler for the 6502 from scratch. My manager/mentor had already designed the basics, and handed me a big pile of notes and flowcharts on my first day or work.<p>Before diving in I wrote a FORTRAN version of the hashing algorithm that we planned to use, and found that we could improve performance considerably with a slight change (I got a raise for doing this).<p>I wrote the assembler in 6502 assembler, using an existing non-macro assembler that ran on our Ohio Scientific machine. I got it to the self-hosting point as quickly as possible so that I could use the advanced features that I had built into my version. We wrote a set of "default" macros to make the instruction set more regular, filling in some holes.<p>After some fine-tuning, I was able to compile macro-dense code at several thousand lines per minute. This was on a machine with two floppy disks and 48KB of RAM.<p>This was an incredible "first project," given that all of my 6502 programs before starting the job had run on my Apple ][ and would fit on a printed page.<p>I still have the listings for the assembler, and pull them out from time to time to reminisce.
pietrofmaggi超过 14 年前
BTW: Commondore keeps a page on the history of MOS and the 6502 with a lot of insights: <a href="http://www.commodore.ca/history/company/mos/mos_technology.htm" rel="nofollow">http://www.commodore.ca/history/company/mos/mos_technology.h...</a>
rbanffy超过 14 年前
A couple weeks back I was catching up with the Retrobits podcast and listened to this interview with Chuck Peddle:<p><a href="http://retrobits.libsyn.com/index.php?post_id=505602" rel="nofollow">http://retrobits.libsyn.com/index.php?post_id=505602</a><p><a href="http://retrobits.libsyn.com/index.php?post_id=514107" rel="nofollow">http://retrobits.libsyn.com/index.php?post_id=514107</a><p><a href="http://retrobits.libsyn.com/index.php?post_id=517736" rel="nofollow">http://retrobits.libsyn.com/index.php?post_id=517736</a><p><a href="http://retrobits.libsyn.com/index.php?post_id=521785" rel="nofollow">http://retrobits.libsyn.com/index.php?post_id=521785</a><p>Simply amazing.
评论 #1701423 未加载
jedwhite超过 14 年前
Ah memories :)<p>Well, actually more like a lot of moving things around in memory...<p>MOVEDOWN LDY #0<p><pre><code> LDX SIZEH BEQ MD2 </code></pre> MD1 LDA (FROM),Y<p><pre><code> STA (TO),Y INY BNE MD1 INC FROM+1 INC TO+1 DEX BNE MD1 </code></pre> MD2 LDX SIZEL<p><pre><code> BEQ MD4 </code></pre> MD3 LDA (FROM),Y<p><pre><code> STA (TO),Y INY DEX BNE MD3 </code></pre> MD4 RTS
allertonm超过 14 年前
I first* learned programming on a 6502-based machine with 1K of RAM and no assembler or basic (Microtan 65, in case anyone remembers that.)<p>Luckily the 6502's instruction set is pretty easy to memorize, used to know it back to front. Only 56 base instructions and once you understand the way the addressing modes affect the opcode for LDA it's easy to work it out for the others.<p>Glad I don't have to do that anymore, but it was a great grounding for all the high-level stuff that came later.<p>(*Well, unless you count my dad's 31-step programmable TI calculator.)
评论 #1701553 未加载
ojbyrne超过 14 年前
I was surprisingly impressed by meeting Brad Templeton in Silicon Valley in ~2006, not because he was a board member at the EFF, nor that he founded Clarinet, but because he wrote PAL, an assembler for the C64 that I used back in the day.
michael_dorfman超过 14 年前
After all these years, I think the 6502 instruction set is still the one I know best.
评论 #1700545 未加载
评论 #1701456 未加载
knuckle_cake超过 14 年前
Maybe this is a good time to toss up the half-finished 6502 simulator I have kicking around.
danbmil99超过 14 年前
My first assembly language. Ahh, the beauty of limitation
hackermom超过 14 年前
Related: <a href="http://www.visual6502.org/JSSim/index.html" rel="nofollow">http://www.visual6502.org/JSSim/index.html</a><p>A 6502 emulator in JavaScript, visualizing the actual core and its electric flow during operation, cycle by cycle, instruction by instruction. If this is not Hacker News worthy, I don't know what is.
评论 #1700786 未加载
评论 #1701176 未加载
评论 #1701108 未加载