6502 was my first assembly, though we didn't have an assembler - we entered raw opcodes into the Epyx FastLoad monitor on the C64. You kids with your symbol tables and your fancy mnemonics. a9 01 8d 20 d0 a9 93 20 d2 ff ... When we got a KIM-1, we were able to write meaningful programs on it in a weekend, since we already had memorized all the hex.
I believe 6502 instruction set is a good first assembly language
41–50 of 297 posts
Re: I believe 6502 instruction set is a good first assembly language
#42I cannot agree that the simplicity of the 6502 wins over the 68000. The 68000 has more registers and wider data types: but the registers are all uniformly the same. It's really just two registers A and D, copied a bunch of times in to D0 to D7, and A0 to A7. Whatever you can do with D0 can be done with D3 and so on. Some A's are dedicated, like for a stack pointer. Simplicity of structure has to be balanced with simp…
The 68000 instruction set is very C-like (probably because it draws a lot of inspiration from the PDP-11 which was C's first target). Implementing it sucks (I know from experience) because the ISA is on the large side and all the little pragmatic exceptions add up. But because these exceptions are fairly pragmatic, they're not really a big issue when writing code.
Re: I believe 6502 instruction set is a good first assembly language
#43Earlier quoted context omitted.
> real available hardware Last I checked the 65C02 was still being manufactured and sold. It can also at a blazing 14 MHz.
It's $8 and can't run without external ROM and RAM and a clock circuit and some glue logic. A RISC-V CH32V003 32 bit processor with 2k RAM and 16k of flash running at 48 MHz costs $0.10 for an 8 pin package (6 available I/O pins) or $0.20 for the 20 pin package. Once programmed, it needs only electricity between 2.8V and 5.5V to be applied to start running. https://www.aliexpress.com/item/1005005036714708.html You ca…
There are tutorials on youtube for it as well, such as Ben Eater's tutorial.
Re: I believe 6502 instruction set is a good first assembly language
#44Nope. Too many quirks. 68k or if you must do 8-bit 6809.
It's hard to fathom the 6502 came out in '75, the 6809 in '78 and the 68000 in '79
Re: I believe 6502 instruction set is a good first assembly language
#45Can anyone speak on how it is to move from an older assembly, to a modern CPU? I asked to take an assembly class in local/public college, and was told they wouldn't hold the class because not enough students were interested. This was in 1998, and I truly couldn't believe my ears. I feel like learning modern assembly would be more useful, but maybe 6502 assembly is far easier to pick up? The first language I learned w…
I started with BASIC on a Vic 20 in 1979 in a computer class for kids. Then I got my own Atari 400 at home, so I learned BASIC on that. Then around 1984 I got a Commodore 64 and it was amazing. I quickly got past the BASIC part of the C64 manual and in the back of the manual they had a memory map, all the hardware registers for all the chips, and then all the 6502/6510 opcodes. There was even an entire schematic for…
I spent my teenage years grabbing cracks and texts from BBS', and enjoyed the whole scene. It's really what sparked my interest into writing software, and I always wished I had learned some lower-level skills beyond running a debugger and poking at memory. I felt like if I knew Assembly, I could get into deeper debugging (cracking was initially my "exciting" topic to cover, but now I feel like it would just be understanding memory better when I run into a strange error).
Re: I believe 6502 instruction set is a good first assembly language
#466502 was my first assembly, though we didn't have an assembler - we entered raw opcodes into the Epyx FastLoad monitor on the C64. You kids with your symbol tables and your fancy mnemonics. a9 01 8d 20 d0 a9 93 20 d2 ff ... When we got a KIM-1, we were able to write meaningful programs on it in a weekend, since we already had memorized all the hex.
Even on the Apple //e you could “call -151” to get into the assembler and then type “!” to use the mini assembler
Only on the OG Integer ROM Apple ][ and then again on the later 1985 enhanced ROM //e
Re: I believe 6502 instruction set is a good first assembly language
#47For teaching, I would instead go with RISC-V. In particular RISC-V with the bitmanip extensions, which make some things much easier and gives it feature-parity with the base set on x86 and ARM. The Raspberry Pico 2 has two RISC-V CPUs with those. The board is easy to use, widely available and has a lot of support. There are also alternative boards with the same MCU but other form factors and features.
Re: I believe 6502 instruction set is a good first assembly language
#48Biased here (it was my first language period), but I agree. Simple addressing modes. Getting started with x86 seems like it would warp the thinking a little bit, you can always pick its peculiarities up later. Having worked with the 6809 series as well, it wouldn't be a bad choice either. The Freescale 68HC12 is still in production. Little systems with limited-yet-real I/O give the programmer very useful feedback.
The 6809 seems like a more powerful (16-bit accumulator and index registers, multiply instruction) and orthogonal 6502 (itself a cheaper/simpler 6800) with fewer (possibly charming) quirks? The 6502 won in the marketplace though, apparently due to its lower cost (the 6809 had nearly triple the transistors.) It's nice that it's still in production if you want to build a breadboard system.
Re: I believe 6502 instruction set is a good first assembly language
#49It really isn't. Biggest issue is that register width is half of pointer width, so for arbitrary pointers you at least need to make a trip through the zero page. That fact alone really obfuscates a lot of what you're trying to teach as a first stab in assembly. I say this as someone who has a whole lesson plan in 6502 asm.
But all that being said, 68000 or modern ARM or RISCV are also good targets. I am probably just a little nostalgic for the 6502.
Re: I believe 6502 instruction set is a good first assembly language
#50Biased here (it was my first language period), but I agree. Simple addressing modes. Getting started with x86 seems like it would warp the thinking a little bit, you can always pick its peculiarities up later. Having worked with the 6809 series as well, it wouldn't be a bad choice either. The Freescale 68HC12 is still in production. Little systems with limited-yet-real I/O give the programmer very useful feedback.
The 6809 seems like a more powerful (16-bit accumulator and index registers, multiply instruction) and orthogonal 6502 (itself a cheaper/simpler 6800) with fewer (possibly charming) quirks? The 6502 won in the marketplace though, apparently due to its lower cost (the 6809 had nearly triple the transistors.) It's nice that it's still in production if you want to build a breadboard system.