This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cannot use 24-bit address mode

Hi everyone, I am using the Keil to compiler my tiny program which copy more than 64KB from SRAM to Flash. the CPU is Dallas DS80C400. according the CPU the DPTR should be 24-bit. after I use

mov dps, #1
mov dptr, #400000

the dptr register ahows 0x4000 only 16-bit not 24-bit.

Is there some configure I missed. Please help me. Thanks.

Dezhong

Parents
  • mov dps, #1
    mov dptr, #400000

    That won't put anything into the usual DPTR --- it'll put decimal 400000 into the secondary DPTR, also known as DPTR1. As such, this is at odds with your claim that you found 0x4000 (hex) in the dptr.

    And what exactly do you mean by the DPTR "showing" 0x4000? Please note that the upper 8 bits of a DPTR will be displayed as a separate register (dpx or dpx1) in the register window of uVision2, not as part of the DPTR itself.

Reply
  • mov dps, #1
    mov dptr, #400000

    That won't put anything into the usual DPTR --- it'll put decimal 400000 into the secondary DPTR, also known as DPTR1. As such, this is at odds with your claim that you found 0x4000 (hex) in the dptr.

    And what exactly do you mean by the DPTR "showing" 0x4000? Please note that the upper 8 bits of a DPTR will be displayed as a separate register (dpx or dpx1) in the register window of uVision2, not as part of the DPTR itself.

Children