I have some 1986-dated 6502 assembly code of mine in hard copy (on dot matrix paper with the "holes" intact). I'm going to scan it one day and post.
Dirty tricks 6502 programmers use
21–30 of 63 posts
Re: Dirty tricks 6502 programmers use
#22What, if any, modern products still use the 6502? EDIT: That’s not a dig against the 6502. I still fondly remember leaning BASIC in my C64 and wish now I had ventured into Assembly with it. By today’s standards it seems to have a simpler and more approachable instruction set so I’m wondering if there aren’t products I could hack on to learn Assembly with it. Or maybe I should just break out my old Commie.
Re: Dirty tricks 6502 programmers use
#23>Entries were posted as Twitter replies and DMs, containing only the PRG byte-length and an MD5 hash of the PRG file. This is clever. So basically rather than getting bogged down reviewing submissions you just pick a winner and then validate post-hoc! (because when you win the hash of your code has to match the one you submitted)
Re: Dirty tricks 6502 programmers use
#24Not to belittle the article, because it's definitely interesting. But as an ex-BBC 6502 programmer, my nitpick here would be that the title should really be named "Dirty tricks C64 6502 programmers use". On the beeb we had our own set of tricks specific to the memory layout and ROM of our beloved beige and black machines.
title should really be named "Dirty tricks C64 6502 programmers use". In that case, probably Dirty Tricks 6510 Programmers Use would be even better.
In this case, the real C64 specific tricks are not 6510 specific, but depending on the specific initialization done by the C64 ROM and calling C64 ROM routines.
Re: Dirty tricks 6502 programmers use
#25My first 6502 program was self-modifying; I wrote it just before reading the book chapter on using registers for indexing relative to a base address. That book was Programming the 6502 by Rodney Zaks. I have some 1986-dated 6502 assembly code of mine in hard copy (on dot matrix paper with the "holes" intact). I'm going to scan it one day and post.
Re: Dirty tricks 6502 programmers use
#26Earlier quoted context omitted.
Why is it your favorite?
I'm not the OP, but I always liked its simplicity. There's just enough space to do something interesting without getting bogged down in too much complexity.
And doing something useful with 56 instructions, 8-bits at a time, is like solving a puzzle.
Re: Dirty tricks 6502 programmers use
#27https://hackaday.com/2018/12/05/apple-ii-megademo-is-countin...
Apple II, but in the comments are links to a C64 demo, a IIGS demo, and a ZX spectrum demo (which is Z80, not 6502, but same era).
Re: Dirty tricks 6502 programmers use
#28Earlier quoted context omitted.
I'm not the OP, but I always liked its simplicity. There's just enough space to do something interesting without getting bogged down in too much complexity.
I think it's because it was my first. And it is simple. Yes there are many addressing modes (like zero-page, and "absolute indirect", and "indexed indirect") but there's only 56 instructions and you can learn it in one afternoon. And doing something useful with 56 instructions, 8-bits at a time, is like solving a puzzle.
It's a detail that doesn't always come up in these threads but it's worth remembering how belligerently 8-bit a 6502 is. Not only are there next to no general-purpose registers but they're 8 bit and there are no pretend-two-registers-are-one-16-bit-register instructions at all. You can't put an address in a register. Compared to even other popular 8 bit CPUs of the time, that's a bit metal.
Re: Dirty tricks 6502 programmers use
#29Thanks! 6502 is still my favorite architecture, even though I've done assembly language programming (professionally!) on many platforms in the past 35 years.
Why is it your favorite?
6502 was first. It is simple. And that makes it a lot of fun.
6809 is beautiful. I think it is the most powerful and elegant of the 8 bit CPUs. But that spoils a person too.
6502 is like whittling computing down to some useful nubs. There are enough subtleties to make it interesting too.
Re: Dirty tricks 6502 programmers use
#30Earlier quoted context omitted.
I think it's because it was my first. And it is simple. Yes there are many addressing modes (like zero-page, and "absolute indirect", and "indexed indirect") but there's only 56 instructions and you can learn it in one afternoon. And doing something useful with 56 instructions, 8-bits at a time, is like solving a puzzle.
8-bits at a time It's a detail that doesn't always come up in these threads but it's worth remembering how belligerently 8-bit a 6502 is. Not only are there next to no general-purpose registers but they're 8 bit and there are no pretend-two-registers-are-one-16-bit-register instructions at all. You can't put an address in a register. Compared to even other popular 8 bit CPUs of the time, that's a bit metal.