Ask HN: Books to learn 6502 ASM and the Apple II
21–30 of 71 posts
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#22Re: Ask HN: Books to learn 6502 ASM and the Apple II
#23Earlier quoted context omitted.
I respectfully disagree, BASIC/Java/Arduino hides too much about how the CPU works from users. Getting a 6502 kit from Ben Eater, and walking though how the CPU works will implicitly show how languages abstracted away whats actually happening. And more importantly, the skills necessary to understand how to write efficient programs. https://www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBy... https://eater.net/6502…
Starting with the 6502 is going to bring you up hard against its addressing modes. Better IMHO to learn about memory and how to access it using arrays in BASIC first.
They say "one always ends up coding in whatever your first language was... regardless of what language you are using".
People could always bring up the BASIC software Rom at the end of the build if interest arises after learning how a simple computer works. =3
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#24For Apple-II specific info, consider The Assembly Lines book -- https://archive.org/details/AssemblyLinesCompleteWagner Understanding the Apple IIe -- https://archive.org/details/understandingapp0000sath Understanding the Apple II -- https://archive.org/details/understanding_the_apple_ii
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#25Machine Language for Beginners, Charles Mansfield https://archive.org/details/ataribooks-machine-language-for-... This book specifically targets beginners that are new to 6502 assembly. The examples cover all of the 1980s-era computers including the Apple II. It's free on archive.org and the introductory chapters are worth reading.
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#26if you think this is impressive, I once opened a modal dialog on an Apple IIGS in 65C816 assembly
I don't think you need to learn BASIC, if you know concepts like conditionals and looping and indexing. It is interesting to compare the higher-level language of the time with its companion assembly. And you might find yourself writing BASIC programs to complement your assembly, if you stick to that platform.
A friend dropped me a BASIC program that ran and wrote text to the Apple IIGS border. He asked me to figure it out, because it wasn't obvious what was going on. OG hacker puzzle... it was a BASIC program that jumped to hidden assembly after the apparent end of the text file (hidden chars maybe, I forget) and the assembly was changing the border at appropriate rate to "draw" on it. Those were the days... trying to find some reference to this and am failing.
I certainly credit my stack-frame debugging capability to dealing with that stuff so long ago. Oddly enough, I didn't really find it helpful for computer architecture class. Just because you know registers exists and how to manipulate them, doesn't exactly map architecting modern hardware system. But being fluent in logic operations and bit-twiddling and indexing does help a lot.
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#27I have fond memories from the late 1980s of trying to get the assembler contained within this book working, typing line after line of the MLX listing in. Unfortunately I never did finish it back then.
A week or so ago I got the urge to complete this project and I literally just finished getting the source in it to a point where it can be compiled online and then within an emulator: https://github.com/jlmcgraw/LADS_DOS33
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#28Earlier quoted context omitted.
Seconded. I bought the first edition of "Programming the 6502" way back in the neolithic, and I enjoyed it greatly. I even read parts of it again now and then these days too, just because I like it. I used to write assembly on, at first, the AIM-65, and later the Apple II.
Is Programming the 6502 enough to learn Assembly on the Apple II ? But it doesn't explain the memory and screen management, right ? So how can we learn that ?
For actual 6502 programming you'll need a dedicated 6502 assembly programming book, for example the aforementioned Rodney Zaks books.
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#29Earlier quoted context omitted.
I respectfully disagree, BASIC/Java/Arduino hides too much about how the CPU works from users. Getting a 6502 kit from Ben Eater, and walking though how the CPU works will implicitly show how languages abstracted away whats actually happening. And more importantly, the skills necessary to understand how to write efficient programs. https://www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBy... https://eater.net/6502…
Starting with the 6502 is going to bring you up hard against its addressing modes. Better IMHO to learn about memory and how to access it using arrays in BASIC first.
Re: Ask HN: Books to learn 6502 ASM and the Apple II
#30https://www.goodreads.com/en/book/show/5011686-apple-machine...
Here is an interesting article on porting a BASIC game for the Apple II to GW BASIC:
https://nanochess.org/akalabeth.html
and it includes a link to the documented source code for Akalabeth (also known as Ultima 0)
Somewhere, there's an article discussing the assembly-language like bit-blitting used to draw the high-res graphics in a timely fashion and the variable/memory management techniques needed to drive that which I'm sure a bit of searching will turn up (or one can derive it from the source).