[HN Gopher] Easy 6502 ___________________________________________________________________ Easy 6502 Author : rahimnathwani Score : 97 points Date : 2022-05-29 11:39 UTC (1 days ago) (HTM) web link (skilldrick.github.io) (TXT) w3m dump (skilldrick.github.io) | Night_Thastus wrote: | For anyone interested in the 6502, assembly and just in general | how things like loops, conditional branches, hardware | communication, etc all work, I HIGHLY recommend Ben Eater's | videos on the subject: | https://www.youtube.com/watch?v=LnzuMJLZRdU | | They are incredibly fascinating! | [deleted] | [deleted] | rahimnathwani wrote: | I came across this when I was searching for resources to help | better understand ALUs and assembler. | | I love it because: | | 1. My first computer (an Acorn Electron) had a 6502 processor, | and gave me my first exposure to assembler. | | 2. It's been built so you can do all the exercises in the | browser. I really like stuff like this (e.g. Scrimba), as it | makes it so much more likely that you'll get started. | | A related point: as I go through it, I'm thinking about which | instructions are really necessary (maybe all of them?) and why it | would be inconvenient if you didn't have a particular | instruction. | pvg wrote: | _which instructions are really necessary (maybe all of them?) | and why it would be inconvenient if you didn 't have a | particular instruction_ | | The ones added in the 65C02 offer some insight there, a very | brief overview from the Wikipedia page: | | https://en.wikipedia.org/wiki/WDC_65C02#New_and_modified_ins... | | Somewhat related and mentioned in one of the comments | downthread, you can view Woz's SWEET16 as a 'the 16 bit CPU a | 6502 system designer and programmer wished they had' take. | jacquesm wrote: | The simplest computer has only one instruction: | | https://en.wikipedia.org/wiki/One-instruction_set_computer | | There is even ZISC: | | https://en.wikipedia.org/wiki/No_instruction_set_computing | | Check out brainfuck if you are into stuff like this. | rahimnathwani wrote: | Haha these are really interesting. | | It seems to program with such a reduced instruction set | requires one to be either a genius or a computer (i.e. | generated code). I'm neither :( | jacquesm wrote: | Either that, or a compiler with such an instruction set as | the target. | | For instance: | | https://github.com/arthaud/c2bf | | It seems like this is a frivolous subject, but it is | actually quite enlightening to realize just how little is | required to get something that computes, it changes how you | view the whole concept of computation. | codedokode wrote: | Very interesting, never heard of this. I love Hacker News for | being able to learn something new from comments. Although I | cannot agree with labeling "horizontally nanocoded CPU" as | "No instruction set". There are instructions, they are just | low-level. | | I wonder, can Turing machine count as "Zero Insturction Set"? | Technically there is no sequence of instructions. | actually_a_dog wrote: | I like this. I learned ASM first on the PDP-11, and I thought | that was a _great_ introduction to assembly language concepts. | 6502 has a lot of similarities with the PDP-11 instruction set, | but also gives you the ability to (if you want to) more easily | deploy your code to a real chip inside a real machine. | sircastor wrote: | I used this when I was learning 6502 assembly so I could build my | senior project (An NES game). It was tremendously helpful to | rapidly test ideas on how to manipulate bits and test | subroutines. ___________________________________________________________________ (page generated 2022-05-30 23:00 UTC)