Live data from Hacker News

I believe 6502 instruction set is a good first assembly language

nemanjatrifunovic.substack.com

11–20 of 297 posts

Re: I believe 6502 instruction set is a good first assembly language

#11

I really don't see how. When students are first exposed to computer programming, it might make sense to start with toy / compact languages that don't have any real-world use. But assembly is not the first language you're supposed to learn! It's very utilitarian and most commonly just used for debugging and reverse engineering. So why would you waste time on the assembly language of a long-obsolete platform? Plus, the…

In many decades past, there were no high level languages, and assembly was the only language.

It was a very different time. Those people would be equally astonished at our casual computing devices and ignorance at how they work.

Oddly enough, my current karma score is 6502. Synchronicity indeed.

Re: I believe 6502 instruction set is a good first assembly language

#13
I 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 simplicity of programming.

It's not that easy to program the 6502, because in moderately complex programs, you're constantly running into its limitations.

The best way to learn how to hack around the limitations of a tiny machine is to completely ignore them and become a seasoned software engineer. A seasoned engineer will read the instruction set manual in one setting, and other pertinent documents, and the clever hacks will start brewing in their head.

You don't have to start with tiny systems to get this skill. When you're new, you don't have the maturity for that; get something that's a bit easier to program with more addressing modes and easier handling of larger arrays, more registers, wider integers.

Re: I believe 6502 instruction set is a good first assembly language

#14

Was the KIM-1 the first 6502 computer? I'm not sure. In any event, try out the KIM-1 simulator if you want to use your 6502 coding skills: https://maksimkorzh.github.io/KIM-1/

It's down to either the KIM-1 or the JOLT. The JOLT was advertised in December 1975 ( http://retro.hansotten.nl/6502-sbc/jolt-and-super-jolt/jolt/ ), compared with the 6502 which was being sampled around June or July. The KIM-1 was variously noted as early as winter 1975 but some sources say it wasn't available until 1976, but then the JOLT probably didn't get into people's hands until then either. I think it's logical that MOS would have been the first one to use their own chip but that's not a given. I have a ROR-less KIM-1, though, so there are systems dating from that early.

Re: I believe 6502 instruction set is a good first assembly language

#15

I really don't see how. When students are first exposed to computer programming, it might make sense to start with toy / compact languages that don't have any real-world use. But assembly is not the first language you're supposed to learn! It's very utilitarian and most commonly just used for debugging and reverse engineering. So why would you waste time on the assembly language of a long-obsolete platform? Plus, the…

I went from BASIC straight to Assembly. I wish they had taught me Assembly when I was 9 years old (in the 1970s) instead of BASIC. Once I learned Assembly I never used BASIC again.

Re: I believe 6502 instruction set is a good first assembly language

#16
post #11

I really don't see how. When students are first exposed to computer programming, it might make sense to start with toy / compact languages that don't have any real-world use. But assembly is not the first language you're supposed to learn! It's very utilitarian and most commonly just used for debugging and reverse engineering. So why would you waste time on the assembly language of a long-obsolete platform? Plus, the…

In many decades past, there were no high level languages, and assembly was the only language. It was a very different time. Those people would be equally astonished at our casual computing devices and ignorance at how they work. Oddly enough, my current karma score is 6502. Synchronicity indeed.

The era in which there was nothing but assembly language was very short-lived.

By the time the 1950s were over, we had higher level languages.

Like before The Beatles recorded their first album.

Re: I believe 6502 instruction set is a good first assembly language

#17
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.

Re: I believe 6502 instruction set is a good first assembly language

#18

Was the KIM-1 the first 6502 computer? I'm not sure. In any event, try out the KIM-1 simulator if you want to use your 6502 coding skills: https://maksimkorzh.github.io/KIM-1/

The wiki says that the KIM-1 was an internal design, and the Apple 1 was the first customer design.

"Another group inside [MOS] designed the KIM-1... One of the first "public" uses for the design was the Apple I microcomputer, introduced in 1976."

https://en.m.wikipedia.org/wiki/MOS_Technology_6502

Re: I believe 6502 instruction set is a good first assembly language

#19

Biased 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

#20

I prefer RISCV as an starting assembly language because: it has good design, it's more intuitive, it has modern language and tool support (GCC, LLVM, Rust, etc.), and it runs on QEMU and real available hardware.

> real available hardware

Last I checked the 65C02 was still being manufactured and sold.

It can also at a blazing 14 MHz.

Post reply on HN