Cpu Special-Function Registers (Sfrs); Windowing - Intel 8XC196K Series User Manual

Table of Contents

Advertisement

The following example initializes the top of the upper register file (8XC196CA, JT, JV, KS, KT)
as the stack. (For the 8XC196JR or KR, the immediate value would be #200H; for the 8XC196JQ
or KQ, it would be #180H.)
LD
SP, #400H
The following example shows how to allow the linker locator to determine where the stack fits
in the memory map that you specify.
LD
SP, #STACK
4.1.7.3

CPU Special-function Registers (SFRs)

Locations 0000–0017H in the lower register file are the CPU SFRs (Table 4-7). Appendix C de-
scribes the CPU SFRs.
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.2

WINDOWING

Windowing expands the amount of memory that is accessible with register-direct addressing.
Register-direct addressing can access the lower register file with short, fast-executing instruc-
tions. With windowing, register-direct addressing can also access the upper register file and pe-
ripheral SFRs.
;Load stack pointer
Table 4-7. CPU SFRs
Address
High (Odd) Byte
0016H
Reserved
0014H
Reserved
0012H
INT_MASK1
0010H
Reserved
000EH
Reserved
000CH
Reserved
000AH
Reserved
0008H
INT_PEND
0006H
PTSSRV (H)
0004H
PTSSEL (H)
0002H
ONES_REG (H)
0000H
ZERO_REG (H)
NOTE
MEMORY PARTITIONS
Low (Even) Byte
Reserved
WSR
INT_PEND1
Reserved
Reserved
Reserved
WATCHDOG
INT_MASK
PTSSRV (L)
PTSSEL (L)
ONES_REG (L)
ZERO_REG (L)
4-13

Advertisement

Table of Contents
loading

Table of Contents