6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 1:59 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Dec 28, 2019 7:00 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
For many beginners, perhaps the biggest hurdle to be cleared in order to get into the 6502 hobby is learning the 6502 assembly language. In a way, it's not unlike emigrating to a country whose dominant language is one you don't know and also uses an alphabet with which you are not familiar. How do you learn to converse with your new friends and acquaintances?

There are a number of fine books that will introduce you to the 6502 assembly language and guide you in your quest for fluency. One such publication is 6502 Assembly Language Programming by Lance Leventhal, first edition published in 1979. While an excellent reference, Dr. Leventhal's is not a book I would classify as a first choice for someone with no prior assembly language experience whatsoever. Copies of this book are available (used) from various sources. The second edition also covers the 65C02, the more technically advanced CMOS version of the original NMOS 6502.

A better choice for the beginner, and one Garth Wilson and I recommend above all others, is Programming the 65816—Including the 6502, 65C02 and 65802, by David Eyes and Ron Lichty. What makes this tome particularly attractive to a beginner is it doesn't assume too much on the part of the reader. If you have some basic knowledge about computers you should have no trouble understanding the concepts presented therein. Originally published in the 1980s, an original paper copy of the book was recently scanned and OCRed so it could be republished as a searchable PDF, as well as in hardcopy form. See here for more details.

As you read the Eyes and Lichty manual and work your way through the various exercises they present, you will need something on which to test your code. For that, I recommend the Kowalski Editor/Assembler/Simulator, which may be downloaded from here (Windows only, extract both files into a convenient directory and run the .exe program—no installation is needed). The Kowalski simulator has everything needed to create 6502-based "computer," which may be operated as an original 6502 (NMOS) or a modern 65C02 (CMOS, recommended) machine. The editor and assembler are excellent (I use them all the time) and the simulator accurately depicts the operation of a real 65(C)02, and includes a basic terminal window for testing interactive programs.

If your programming experience has not included assembly language of any type, welcome to a new world of software creation, one in which even a slow computer will seem to be lightning-fast. Assembly language is different than what you may have experienced in high level languages, but the differences are definitely not insurmountable. Countless others have developed fluency in 6502 assembly language, and so can you. Don't hesitate to ask questions if you get stuck on something. We're more than willing to help if you are willing to put a modicum of effort into learning.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 29, 2019 7:17 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
I do recommend the Eyes & Lichty manual BDD mentions. For whatever reason, the description of it on WDC's site doesn't do it justice. I believe the "Programming the 65816—Including the 6502, 65C02 and 65802" 6502/65816 programmer's manual by David Eyes and Ron Lichty 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. From Western Design Center. (.pdf) Note: There were many problems with the earlier .pdf version that were not in the original paper manual; but in late March 2015, WDC scanned and OCR'ed the paper manual and posted the new, repaired .pdf.

Rodney Zach's manual always gets recommendations too, but it's only for the original NMOS 6502 which was inferior to the CMOS version in software, not just hardware. That's fine if all you want to program is something like the C64 or old game machines that came only with the NMOS; otherwise I recommend you not limit yourself to that.

The 6502 primer has a section called, "Program-Writing: Where Do I Start?" at http://wilsonminesco.com/6502primer/PgmWrite.html, answering what someone said in a forum post, years ago: "and no one really ever tells you in what program do you put the code." There's also the programming-tips section at http://wilsonminesco.com/6502primer/PgmTips.html which presents various ideas and shows how beginners often waste instructions.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: rwiker and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: