XMEM mapping question.

I have inherited a project developed by a person no longer with the company. We no longer have the source to the project as the last developer left in a bit of a huff.

So, it’s up to me to document the code, and rewrite the parts that need to be modified. I have located the function that needs attention, and have disassembled it by hand with the help of the opcode map in the documentation.

I only have one task left, and that’s to identify the where the LCALLs go. In order to accomplish this task, I have to understand the xmem mapping. I’ve read all that the documentation has to say, about the sliding window, and all of that, but still don’t understand, so, here’s my question:

If you were looking at code that called 10:E825, how would you go about finding out where that is in the ROM?

Well, I can answer SOME of my question, but that spawns another. Hopefully someone can help with this part.

The answer to the “Where is 10:E825?” is, according to “Embedded Systems Design using the Rabbit 3000 Microprocessor” is 1E825. If you’re scoring at home, or even if you’re alone.

Multiply the “segment” part by 1000h, and then add the “offset” part.

I tried a few 10:Exxx functions, and they pointed to addresses that were the beginning of functions, so I assume that I have this part correct. But then, I find this:

LCALL FC:EF73

When I do the math outlined above, the result is a value bigger than the ROM file. Anyone know how this works? Is there a “roll-over” value?

Hey Frank. Thanks for using our products, I’d be GLAD to answer that question for you. You see, the system uses a 20 bit address bus to access memory. So, as you did above, you simple multiply the segment component of the address by 1000h, and then add in the index portion. Then, AND the result with FFFFF (20 bits of 1’s), and you have your address!

I’m so glad I could provide you the help that you needed, and hope that you’ll continue to use DIGI Rabbit products in the future!