[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with confirmation on a small bit of assembly?
David Empson wrote:
> 6502 was my first assembly language (and about my third programming
> language, after Apple Pascal and Applesoft BASIC). I later moved on to
> more flexible assembly languages at work (I do embedded systems
> programming) and mostly use C these days, but I still remember enough
> 6502 machine code to be able to rattle off rubbish like this and know
> what it means:
>
> A9 C1 20 ED FD 18 69 01 C9 DB D0 F6 60
>
> (Assuming I've remembered the correct opcodes for ADC and CMP
> immediate.)
Looks right.
> Don't ask me to write anything more complex off the cuff. ;-)
>
> Sigh. All those formative teenage years spent typing in programs from
> Nibble magazines. I'll never forget LDA immediate. What a waste of brain
> cells.
Well, at least you don't get an Elvis Presley song stuck in your head
every time you see the number 60 in hex (I do :-( )
> > You've pointed out yet another idiotic mistake I've made of late but
> > couldn't see. Somehow during my breakdown of it 0xF = 16. Last time I
> > checked 16 != 15.
>
> I'm sure someone can come up with a proof that 16 = 15, based on the 1 =
> 0 concept. :-)
Damn you Empson! I'd never seen that before, and now that I've Googled,
I'll be awake for days trying to decide if it's funny or not
Matt