Menu

#1904 Monitor acts weird

v3.x
closed-invalid
nobody
None
GTK3
Monitor
2023-06-27
2023-06-25
Zibri
No

To reproduce:

start x64sc.exe
then enter the monitor with alt+h
then write:
watch fffc ffff
and then
x

the montor should stop on read or write access to $FFFC,$FFFD,$FFFE,$FFFF....
instead:

(C:$e5cd) watch fffc ffff
WATCH: 1  C:$fffc-$ffff  (Stop on load store)
(C:$e5cd) x
#1 (Stop on  load fffe)  296/$128,  28/$1c
.C:e5cd  A5 C6       LDA $C6        - A:00 X:00 Y:0A SP:f0 ..-..IZ.   15841756
#1 (Stop on  load ffff)  296/$128,  28/$1c
.C:e5cd  A5 C6       LDA $C6        - A:00 X:00 Y:0A SP:f0 ..-..IZ.   15841756

Discussion

  • gpz

    gpz - 2023-06-25

    so what exactly is weird about this?

     
    • Zibri

      Zibri - 2023-06-25

      it stopped on LDA $C6 !
      which has nothing to do with the watched range!

       
      • Ingo Korb

        Ingo Korb - 2023-06-25

        Have you considered that FFFE/FFFF is the IRQ vector? Watchpoints trigger on all memory accesses, not just the ones explicitly made by an instruction.

         
      • Marco van den Heuvel

        When an irq happens it pushes the high byte of PC onto the stack, then pushes the low byte of PC onto the stack, then pushes P onto the stack, then sets I to 1, then loads PC with the values at $fffe and $ffff, which triggers the watch, twice, and then continues executing at that address, if you had done the monitor step command you would have seen it jump to the irq handling address.

         
  • gpz

    gpz - 2023-06-25

    What else did you expect then?

     
  • Marco van den Heuvel

    • status: open --> closed-invalid
     

Log in to post a comment.