Table of Contents

Advertisement

Using any SFR as a base or index register for indirect or indexed operations
can cause unpredictable results. External events can change the contents of
SFRs, and some SFRs are cleared when read. For this reason, consider the
implications of using an SFR as an operand in a read-modify-write instruction
(e.g., XORB).
4.3

WINDOWING

Windowing expands the amount of memory that is accessible with direct addressing. Direct ad-
dressing can access the lower register file with short, fast-executing instructions. With window-
ing, direct addressing can also access the upper register file and peripheral SFRs.
Memory-mapped SFRs must be accessed using indirect or indexed addressing
modes; they cannot be windowed. Reading a memory-mapped SFR through a
window returns FFH (all ones). Writing to a memory-mapped SFR through a
window has no effect.
Windowing maps a segment of higher memory (the upper register file or peripheral SFRs) into
the lower register file. The window selection register (WSR) selects a 32-, 64-, or 128-byte seg-
ment of higher memory to be windowed into the top of the lower register file space (Figure 4-5).
NOTE
NOTE
128-byte Window
(WSR = 17H)
Window in
Lower Register File
Figure 4-5. Windowing
MEMORY PARTITIONS
03FFH
0380H
00FFH
0080H
A3060-01
4-15

Advertisement

Table of Contents
loading

Table of Contents