Re: 16 bit compare

From: David Roberts <daver21145_at_gmail.com>
Date: Tue, 22 Oct 2019 21:58:08 +0100
Message-ID: <CAC5emFF3bzj-S3kd-YKu7ZAyaQy_pgJLRs2pPO_WRpy4dAg5Ag_at_mail.gmail.com>
My thought is that your problem may not be in this bit of code itself, but
the bit of code that converts from ASCII text on your monitor command line
to the two 16-bit parameters SRC and DST.

Dave

On Tue, 22 Oct 2019 at 21:52, André Fachat <afachat_at_gmx.de> wrote:

> Try
> BNE SRCNEXT
> instead of the BCC.
> Cannot explain, but if high byte is not equal and in particular larger,the
> comparison of the low byte overwrites this info.
>
> André
>
> Am 22. Oktober 2019 22:35:01 schrieb didier_at_aida.org:
>
> > for years I programmed the 6502 mostly on the commodore 8000
> >
> >
> > I've restarted with the 6502 (programming a monitor)
> > it mostly works (with you help for relative branch)
> > it's usable but I still have several glitches
> >
> >
> > in the memory dump it display the memory
> > for example if I use the range
> > M 0400 0500   the display is correct
> > M 0400 04F8   the display is also correct
> > but if I try
> > M 0400 04FX  with X in 9..F  in never end and goes in an infinite loop
> >
> >
> > the compare function I'm using:
> > SRCEND:    LDA    SRC+1
> >                    CMP    DST+1
> >                    BCC    SRCNEXT
> >                    LDA    SRC
> >                    CMP    DST
> > SRCNEXT:  RTS
> >
> >
> > SRC = current addres  (first argument of command M)
> > DST =  limit  (second argument of command M)
> >
> >
> > I use the function this way:
> > CMDDUMP1    JSR    SRCEND
> >                           BCS    CMDDUMPEND
> >
> >
> > any idea ?
> > spent several days on this problem...
> >
> >
> > thanks
>
>
>
>
>
Received on 2020-05-29 23:20:54

Archive generated by hypermail 2.3.0.