[BULK] [Color Computer] [Coco] ASM Coders - Round two!

Charles Richmond richmond at plano.net
Wed Aug 30 11:20:48 EDT 2006


On Aug 30, 2006, at 3:11 AM, James Diffendaffer wrote:

>        [snip...]          [snip...]         [snip...]
>
> The 6502 has (this should look sorta familiar only different):
> A - 8 bit Accumulator
> X - 8 bit index
> Y - 8 bit index
> Page 0 works like the direct page but is unmovable.
> Page 1 is the stack and unmovable since the stack pointer is 8 bit.
> To really index stuff requires indexed indirect tables of 16 bit
> pointers in page 0.
> The 6502 can only perform short reletive branches so you'll find a lot
> of conditional branches that jump to an absolute branch.
>

You might also mention that in programming the 6502, quite often
one or both of the X asnd Y index registers are used as counters.
In addition, there is *no* instruction to push X and Y on the
stack...you must transfer them to A (the accumulator) and push
the A register on the stack.

The relative branches can branch something over 120 bytes forward
or backward. In my experience, that has been adequate for most
loops.

In defense of the 6502, all of the instructions take very few
clock cycles to execute. So you may do *more* instructions and
take *less* time to accomplish something.

--
+----------------------------------------------------------------+
|   Charles and Francis Richmond     richmond at plano dot net   |
+----------------------------------------------------------------+





Brought to you by the 6809, the 6803 and their cousins! 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ColorComputer/

<*> To unsubscribe from this group, send an email to:
    ColorComputer-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 






More information about the Coco mailing list