Page-switching Mechanism

In order to view a particular physical page in the local map's page window, the programmer needs to write the page number into the page register.

Once the appropriate page of physical memory has been "displayed" inside the page window, the CPU can access this data with a 16 bit address corresponding to a location inside the page window.

It is important to understand that, when a memory resource is paged, the totality of this resource can be accessed through the page window. However, writing to the page register every time a memory location has to be accessed introduces a certain amount of overhead. This is why, certain locations are also mapped directly into the local map.

These locations that are always mapped onto the CPU local map regardless of any page-register value are called non-banked, or non-paged locations. For these locations, most of the time the paged access is not used and the direct access is always preferred. The totality of a paged-memory resource is conceptually divided into numbered pages, non banked locations from the resource and have a certain page number associated.

The fiugre below shows the page numbers that are associated with the non-banked locations in the local map and page numbers that associated with the extended locations. For local map locations, it can be accessed by two ways.

For example, address 0x038000 is equivalent to address 0xC000.

The following figure shows the paging mechanism of device MC9S08QE128.

Figure 1. MC9S08QE128 Memory Map

MC9S08QE128 Memory Map