[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 ML programming




Jim Choate <[email protected]> wrote:
> 
> There in no 'DATA' construct in 6502 assembly.
> 
> This is some sort of macro that either the assembler or programmer
> defined. All official Rockwell/Commodore [1] 6502 assembly mnemonics are
> three letter.

True, but most assemblers would let you insert static data into the object
file using various pseudo-ops like that.


> Idealy a jump table was created that had the various target addresses for
> your routines.

Oh, those were fun to debug too...


> The most efficient way to store data in 6502 is to put it in the first 256
> bytes of ram, then it could be called in no more than 2 clock cycles.

Actually that took three cycles.  One to fetch the opcode, one to fetch the
target address, and one to fetch the data byte.  If you wanted to do it in
two cycles, you had to write the data into the operand of the instruction
that loaded it (self-modifying code).