6502 ML programming

Matthew Ghio ghio at temp0133.myriad.ml.org
Wed Oct 8 23:56:33 PDT 1997



Jim Choate <ravage at ssz.com> 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).







More information about the cypherpunks-legacy mailing list