I have 8051 firmware file, in 8051 ROM addresses can overlap external RAM addresses(movc and movx solve this issue), however IDA doesn't allow overlapping addresses: enter image description here

In this example the ROM size is 0x7000 and external RAM size is 0xFFFF.

I need the external RAM addresses so I can rename certain addresses, How it is possible to solve this issue?


1 Answer 1


The default dialog you’re seeing uses so-called “linear addresses” which are global for the whole program and can not intersect. It is mostly useful for processors with unified (Von Neumann) address space.

Since 8051 is a Harvard architecture with separate code and data memories, each one starting at zero, IDA emulates it by creating non-intersecting segments in the linear address space but setting up the segment base in such a way that the apparent addresses inside the data segment also start at 0. You can check how it’s done by dismissing this dialog and letting the default 8051 handling do its job. In a similar manner you can create a custom segment for the XRAM address space. Once this is done, to specify that a value(e.g. an instruction opearand) is an offset in a specific segment, you can use these shortcuts:

  • Data segment: O
  • code segment(actually “current segment”): Ctrl-O
  • any another segment: Alt-R

These commands are available in the Edit|Operand types|Offset submenu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.