Breakpoint & Memory window questions

1) I am just getting started with the Keil 8051 IDE. For now, I am running the Hello World ASM example and would like to configure a breakpoint to break on read/write to DPTR, or any other SFR as a matter of fact. I go under Debug menu, Breakpoints and enter DPTR under expression and check off READ & WRITE check boxes yet when I go to define the breakpoint I get the message "breakpoint definition error". What's the proper way to define a breakpoint on an SFR read/write in the KEIL IDE?

2) The SP => 69H in the Hello world asm example. When the example steps into a function, the SP increments by two storing the return address. Yet when I go to View, Memory window, memory address 69h & 70h contain 0. Why can't I see the return address in memory?

Parents
  • The access breakpoints do not work on the core SFR's like ACC, B, DPTR, PSW, and the registers R0-R7. Basically almost every instruction is working with these registers and access breakpoints are therefore not useful.

    For the memory read you need to apply correct memory prefixes like I: for the IDATA space. See the Assembler User's Guide, Chapter 2 for an overview of the architectures.

Reply
  • The access breakpoints do not work on the core SFR's like ACC, B, DPTR, PSW, and the registers R0-R7. Basically almost every instruction is working with these registers and access breakpoints are therefore not useful.

    For the memory read you need to apply correct memory prefixes like I: for the IDATA space. See the Assembler User's Guide, Chapter 2 for an overview of the architectures.

Children
More questions in this forum