10 ms·
Well, I have written a lot of code on 6502. What you name is the value to be operated on, and that is indexed, zpage, immediate, etc... the accumulator is not
by ddingus 11y ago
Well, I have written a lot of code on 6502.
What you name is the value to be operated on, and that is indexed, zpage, immediate, etc... the accumulator is not named. There are two or three bytes, one instruction, one or two for value or address.
Same for things like ADC, the accumulator is where it will happen, the things you name are values and addresses.
LSL, LSR can just be stated, one byte instructions that operate on the accumulator, which does not need to be specified.
6502 is really basic. The accumulator is the working register for many things. The index registers are for indexing. One does not do LDX $c000, A for example.
- pvg 11y agoI believe you. But it was, quite typically, like you can see in the Woz code above. Or from '6502 Assembly Language Subroutines', 1982 vintage. http://i.imgur.com/jreIWA5.png http://i.imgur.com/jreIWA5.png
- ddingus 11y agoYeah, it can be. No worries. Guess I never assembled on something that required it. Fun old times in any case. That chip provided just enough, and no more.