User`s manual

Dynamic C Users Manual digi.com 101
bytes added to the program. The follows action is an advanced topic related to
the subject of origin directives. See the Rabbit 3000 Designers Handbook for a
discussion of origin directives and action qualifiers.
The map file provides the logical and physical addresses of the program and its
data. The screen shot below shows a small section of demo1.map. The left-
most column shows line numbers, with addresses to their immediate right. Using
the addresses we can reproduce the actions taken by the Memory Management
Unit (MMU) of the Rabbit. Addresses with four-digits are both the logical and
the physical address. That is because in the logical address space they are in the
base segment, which always starts at zero in the physical address space. You can
see this for yourself by opening two dump windows: one with a four-digit logical
address and the second with that same four-digit number but with a leading zero,
making it a physical address. The contents of the dump windows will be the
same.
The addresses in the format xx:yyyy are physical addresses. For code xx is the
XPC value, for data it is the value of DATASEG; yyyy is the PC value for both
code and data. In the above map file you can see examples of both code and data
addresses. Addresses in the format xx:yyyy are transformed by the MMU into a
5-digit physical address.
We will use the address fa:e64c to explain the actions of the MMU. It is really
very simple if you can do hex arithmetic in your head or have a decent calculator.
The MMU takes the XPC or DATASEG value, appends three zeros to it, then
adds it to the PC value, like so:
fa000 + e64c = 10864c
A sixth digit in the result is ignored, leaving us with the value 0x0864c. This is
the physical address. Again, you can check this in a couple of dump windows by
typing in the 5-digit physical address for one window and the XPC:offset into
another and seeing that the contents are the same.