7 ms·
I have litteraly no programming experience, that's partly why I want to learn 6502 Assembly.
by abkt 8mo ago
I have litteraly no programming experience, that's partly why I want to learn 6502 Assembly.
- zabzonk 8mo agoMuch easier to start with BASIC. After all, why not?
- Joel_Mckay 8mo agoI 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=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH https://www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBy... https://eater.net/6502 https://eater.net/6502 Starting with a simple architecture is highly recommended. =3
- zabzonk 8mo agoStarting 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.
- Joel_Mckay 8mo agoDepends on learning goals, as BASIC teaches people some really bad habits. 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 https://github.com/chelsea6502/BeebEater https://github.com/chelsea6502/BeebEater
- Tor3 8mo agoMy opinion differs - learning how memory is accessed via assembly language will make it super easy to understand e.g. how C pointers actually work, something which can be surprisingly difficult for those who go directly to a high level (compared to assembly) language, but very easy if you come from machine code/assembly.
- 20wenty 8mo agoI second this -- I just found the Ben Eater series a month or so ago and put together his computer clock over the holidays. It really helps you understand clock cycles, logic chips, etc, and is a good foundation for the 6502 kit you build later in the course. And learning Assembly before BASIC is the right learning path IMO, if only to understand how CPU registers work at the electron level.
- Joel_Mckay 8mo agoIf one is interested in how internal PC registers work, than these build series do the classic eeprom microcode based CPU builds. Fabian's series is highly accessible, and builds a python based assembler from scratch. James series ends with a simple game design. Cheers, =3 "Build a Superscalar CPU" (Fabian Schuiki) https://www.youtube.com/watch?v=bwjMLyBU4RU&list=PLyR4neQXqQo5nPdEiMbaEJxWiy_UuyNN4 https://www.youtube.com/watch?v=bwjMLyBU4RU&list=PLyR4neQXqQ... https://github.com/fabianschuiki/superscalar-cpu https://github.com/fabianschuiki/superscalar-cpu "Making an 8 Bit pipelined CPU" (James Sharman) https://www.youtube.com/watch?v=3iHag4k4yEg&list=PLFhc0MFC8MiCDOh3cGFji3qQfXziB9yOw https://www.youtube.com/watch?v=3iHag4k4yEg&list=PLFhc0MFC8M...
- whartung 8mo agoStarting with Assembly is simply a bad idea because the tooling is terrible, and the learning curve of the tooling is steep. Filled with arcane codes and abbreviations and workflow right out the gate. Programming concepts are pretty much universal. Being distanced from computer architecture is not a limitation for novice programmers, Python et al succeeds for a reason. If you're determined to start with assembly, then I hope you can find someone to help you get started with all the machinations necessary to get from LDA #0 to A9 00 with as little drama as possible. Someone to show you how to use the assembler, what the directives mean, the linker, a symbolic debugger (if you're lucky). Someone to provide you with a .DUMPREG "START OF SORT" and .DUMPMEM BUFF $80 "AFTER INPUT" macros that you can liberally scatter throughout your code so you actually progress and get some insight into what the heck you code is doing. Perhaps some way to stop your programs that doesn't include hitting the reset button on the machine. I mention that because, again, the tooling is terrible. All of the is easier said than done. None of the assembly books address this, none of the assembly program reference guides do either. Assembly is VERY black box. It's a large step up to even get started. It's much easier to "learn programming" first at a higher level, where you can quickly progress and succeed, before turning into the dark hole that is assembly, particularly on older machines. At least on a KIM-1 you can hit the STOP button and cursor through memory (being conscious that the memory architecture of the KIM is quite funky), something that simple is quite difficult on an Apple ][.
- Joel_Mckay 8mo agoIn general, Assembly for a simple well documented CPU is fairly close to most familiar calculator operations, and is demonstrated as a 1 to 1 relationship in the binary firmware. If folks drop on abstractions like Scratch/Basic/Python/Java the students will develop a random notion of what Register/Stack/Heap even means. I would recommend looking at a few random samples of Ben's build series, as he covers most first year subjects in subtle efficient ways. Soldering kit PCB or Emulators are insufficient to demonstrate a physical bus wire harness, clock timing, and memory layout. Best of luck =3
- peterevans 8mo agoAssembly is a type of programming that is unlike most programming languages, and as such, would be a really tough introduction to the field. Can you explain a bit more about how you became interested in assembly and programming the Apple II? And specifically, why you want to start the journey towards programming there?