[Coco] Programming help

Johann Klasek johann+coco at klasek.at
Tue Jun 25 10:03:21 EDT 2013


On Tue, Jun 25, 2013 at 11:25:31PM +1000, Mark McDougall wrote:
> On 25/06/2013 11:13 PM, Bill wrote:
> 
> >I?m trying to write an assembly language routine, and having what?s 
> >probably
> >a very simple problem.
> 
> >70          ORG   $0EOO
> >80          ORCC #$50
> >90          LDX   #$8000
> >100         LDY   #$FFC0      *BANK 0
> >110   COPY  STB   $FFDE
> >120         LDB   O,Y
> >130         LDA   O,X
> >140         LDB   $08,Y *BANK 00/00
> >150         STB   $FFDF
> 
> It's been a long time since I did any 6809 assembler, but at first glance 
> this looks like it doesn't do anything useful; switches in roms, reads 3 
> bytes, switches out roms, then continues to execute whatever's in memory 
> after line 150!?!

Indeed, the loop construction is missing at all.
No address increments, no counter, cleaning up the interrupt masking
(ANDCC #$AF) and return to a caller ...

I would guess that $FFDE and $FFDF takes the address of the bank which
is written to or read from? But this is too speculative to come along
with a corrected code snippet ...

Johann

-- 
The dragon on my side: http://klasek.at/hc/dragon/



More information about the Coco mailing list