Live data from Hacker News

Dirty tricks 6502 programmers use

nurpax.github.io

11–20 of 63 posts

Re: Dirty tricks 6502 programmers use

#11
post #3

What, 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.

I believe the Tamagotchi toys used the 6502.

https://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-reve...

Re: Dirty tricks 6502 programmers use

#12
post #9

Thanks! 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?

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.

Re: Dirty tricks 6502 programmers use

#13
post #3

What, 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.

They were used a lot in cars. I'm not sure if that is still the case.

Re: Dirty tricks 6502 programmers use

#14
>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

#15
post #3

What, 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.

I'm unsure but I think 6502's are available as cores for semi and full custom IC's. Where the the processor core and memory is fully laidout. Bonus runs with a GHZ clock which gives you the ability to twiddle bits like mad.

So outside of retro computing you won't see a 6502 IC in the wild. But they likely are buried deep in nondescript IC's

Re: Dirty tricks 6502 programmers use

#16
post #12
post #9

Earlier 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.

I only know 6502 in the Atari 2600 programming context. It's such a great pair because the 2600 hardware is very unique, so it gives you fun problems in that domain as well.

Re: Dirty tricks 6502 programmers use

#17
post #12
post #9

Earlier 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.

Simplicity? - it has some many addressing modes. Pretty much forced into zero page+Y, but zero page is so limited. Direct code modification, i.e. counters within the code was the next most common.

Of course division was an art. That being said I enjoyed it alot and still know quite of the opcodes (hex) by heart + the clock count of many instructions.

Re: Dirty tricks 6502 programmers use

#18
post #3

What, 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.

C64 and many Atari, Apple, and Nintendo products used it, including arcade machines. People still make new stuff, with new interesting hacks, for all of them, every day. I suspect anything new wouldn't be as interesting as playing with the old systems because if anything needed more interesting features these days, they'd use something much more modern. Back then they had to squeeze all the "interesting" they could out of the 6502 specifically. You can easily play with it in the browser [1].

[1] https://8bitworkshop.com/v3.4.0/?=&file=examples%2Fbrickgame...

Re: Dirty tricks 6502 programmers use

#19
post #4

Not 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.

Yeah the moment they introduced a ROM call to optimize the routine, I kind of lost interest.

Re: Dirty tricks 6502 programmers use

#20
post #3

What, 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.

You can still buy them at https://www.westerndesigncenter.com/wdc/chips.cfm / https://wdc65xx.com/chips/ ( https://en.wikipedia.org/wiki/WDC_65C02 )

From the wdc65xx link:

> The W65C02S is a low power 8–bit microprocessor utilized in a vast array of products for the Automotive, Consumer, Industrial, and Medical markets. This chip features a full external data (8–bit) and address (16–bit) bus for easy integration with 8–bit peripherals and memory.

Digging in the about page:

> Through the last 30+ years as one of the most popular microprocessor architectures of all time the 65xx brand is estimated to have over six billion embedded 65xx processors shipped and is growing by hundreds of millions of units per year, provided by WDC and its licensees. The following is a partial list of high volume applications that have been successful in using 65xx processors:

> ...

> · Toys

> · Automobile dashboard

> · Appliance controllers

> · Industrial controllers

> · Embedded heart defibrillator’s

> · Pacemakers

Post reply on HN