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

Re: Assembler code



Exact, the third and sixth byth are +2 +5 respectively

"Martin Doherty" <martin.doherty@undisclosed.com> wrote in message
news:z3BFd.27$dA1.132@news.oracle.com...
> Jplcsch wrote:
>
> > in assembler the routine could be
> >
> >                        LDX #$00
> >                        LDY #DA ; init source address it's enough here
> >  MYMOVE     LDA #00
> >  LOOP1          LDA $DA00,X  :
> >                        STA $8000,X
> >                        DEX
> >                        BNE LOOP1
> >                        INY
> >                        CPY #DC
> >                        BEQ EXIT
> >                        TYA
> >                        INC LOOP1+3  ; modify memory source high adress
> >                        INC LOOP1+6 ; modify memory dest high address
> >                        JMP MYMOVE
> >    EXIT           RTS
> >
> > "sanjaya" <pererasanjaya@hotmail.com> wrote in message
> > 5e56673f.0501100007.40cb668f@posting.google.com">news:5e56673f.0501100007.40cb668f@posting.google.com...
> >
> >>can someone help me with the assembler code to move memory contents
> >>from $DA00-$DBFF (Bank 1 main memory) to $8000-$81ff (main memory).
> >>
> >>thanks,
> >>sanjaya
> >
> >
> >
> I'm confused ... it looks to me like LOOP1+3 and LOOP1+6 are pointing to
> the wrong bytes. LOOP1 is the address of the opcode LDA, LOOP1+1 is the
> address of the low byte of $DA00, and LOOP1+2 is the address of the high
> byte of $DA00. Ditto for LOOP1+6, I believe it should read LOOP1+5. Am I
> missing anything?
>
> Martin