Now that I have a reliable software environment, I need to buckle down and actually learn something about the 6502. I do better with physical books (I find the internet too distracting to use it for prolonged study.). To that end, I have copies of:
Programming the 65816 by Eyes and Lichty
Programming & Interfacing the 6502 by De Jong
Programming the 6502 by Zaks
Which of these books would you recommend for a beginner? I'm not put off by heavy lifting but it's been many years since I did any serious programming and my previous experience with Machine Language consists entirely of writing a "Hello World" program on my Amiga 25 years ago.
Zaks is always good, but won't get you past the original NMOS '02. I believe the Eyes and Lichty manual is the best 65xx programming manual available, and a must-have for every 65xx programmer. It starts with the basics, followed by architecture, the CMOS 65c02's many improvements over the original NMOS 6502 including added instructions and addressing modes and fixing the NMOS's bugs and quirks, and then the natural progression to the 65816; a thorough tutorial, writing applications, then very detailed and diagrammed information on all 34 addressing modes, at least a page of very detailed description for each instruction, with info on every addressing mode available for that instruction, then instruction lists, tables, and groups, of all 255 active op codes, plus more. 469 pages. I think it's still excellent even if you don't plan to go on to the 65816.
Here are a few books from my list that I have found interesting myself and seem like they would be useful for people ranging from complete beginners to those having a basic undrstanding of 6502 assembly.
Leventhal and Saville, 6502 Assembly Language Subroutines. The first three chapters are a reasonably deep introduction to 6502 machine language aimed at people who already have an understanding of assembly language in general. If you've got the knowledge to keep up with it, this is one of the faster ways of learning about tricks and traps of coding for the 6502. The remainder of the book is just listings of a lot of routines to do a lot of different things. I don't find these directly useful, since they're written more for clarity and modularity than for compactness and speed, but they are educational reading and I do sometimes directly use their techniques..
Ken Skier, Beyond Games: Systems Software for Your 6502 Personal Computer. The first four chapters are a general introduction to assembly language programming on the 6502; the next 10 cover writing a system monitor including things like printing and disassembling memory. As well as being an educational, non-trivial chunk of code, this might be especially useful if don't already have a system monitor for your target system. The last chapter and appendices cover getting the code into various popular late-70s and early-80s computers such as the PET, Atari 800, etc.
Roger Wagner, Assembly Lines: The Complete Book. Described as "A beginner's guide to 6502 programming on the Apple II," this is a compendium of several dozen columns that Wagner wrote for Softalk magazine in the early 80s. It's very heavily Apple-II-oriented, but if you are using one (or an emulator) it teaches you not only 6502 assembly but also how to use the software built in to the Apple II, including the monitor ROM program and the ROM routines. I think this would make learning a lot easier in a pre-simulator world since you immediately start working in an envirionment where you can print things and so on. This is probably not so necessary when using a simulator where you can simply stop executation and examine registers and memory without the CPU running.
Jules H. Gilder, Now That You Know APPLE ASSEMBLY LANGUAGE: What Can You Do With It?. As implied by the title, this is not for complete beginners to 6502 assembly language. (And as also implied, it's very Apple-II-oriented.) However, once you've got a reasonable start on it (you know a lot of the instructions and know where to look up the ones you don't know), this gets you into writing real, useful subroutines and programs, starting with basic printing to the screen and accepting input and moving on to using the input/output hooks, generating sound and adding features to Applesoft BASIC. As with the Skier book, the real value here is the chance to get beyond "Hello, world" and look at some not-entirely-trivial programs and how they're actually used in the real world.
Now that I have a reliable software environment, I need to buckle down and actually learn something about the 6502. I do better with physical books (I find the internet too distracting to use it for prolonged study.). To that end, I have copies of:
Programming the 65816 by Eyes and Lichty
Programming & Interfacing the 6502 by De Jong
Programming the 6502 by Zaks
Which of these books would you recommend for a beginner? I'm not put off by heavy lifting but it's been many years since I did any serious programming and my previous experience with Machine Language consists entirely of writing a "Hello World" program on my Amiga 25 years ago.
Thanks for your suggestions!
I second Garth's recommendation. Go with the Eyes and Lichty tome and skip the others.
I would also go with the Eyes and Licthy programmers manual, you simply can't go wrong with it.
An additional book I would recommend is the 6502 Assembly Language Subroutines by Leventhal and Saville. It contains a lot of good and useful routines, and all have been tested and run on an Apple-II.
De Jong's book is pretty interesting. It's almost like two books in one. The first half is a KIM-1 centric intro to 6502 assembly. Since it's focus is a pretty basic group of machines the programming style is very "bare metal". The second half of the book is a series of experiments which involve interfacing the 6502 to all sorts of popular late 70s ICs. There's quite a lot of technical information including pinouts and timing diagrams. If you're a hardware hacker, it might be worth checking out.
Sounds like Eyes and Lichty is the way to go. Though I may work though Zaks as well. Having been a math major, the fact that Programming the 6502 is laid out like a textbook appeals to me.