16 bit compare

From: didier_at_aida.org
Date: Tue, 22 Oct 2019 22:32:34 +0200
Message-ID: <01702d8e-7938-0cf6-0d81-f3e8cd6c803e_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:23

Archive generated by hypermail 2.3.0.