Intel Microcontroller Microscope & Magnifier User Manual


 
8XC196NP, 80C196NU USER’S MANUAL
5-24
For nonextended instructions, the EP_REG register provides the page number. Data and constants
in this page are called near data and near constants.
NOTE
The 8XC196NP allows you to change the value of EP_REG to control which
memory page a nonextended instruction accesses. However, software tools
require that EP_REG be equal to 00H. The 80C196NU forces all nonextended
data accesses to page 00H. You cannot use EP_REG to change pages.
Data outside the page specified by EP_REG is called far data. To access far data, you must use
extended instructions. For extended instructions, the CPU provides the page number.
Figure 5-8. Formation of Extended and Nonextended Addresses
The code example below illustrates the use of extended instructions to access data in page 01H.
EP_REG EQU 1FE5H
RSEG AT 1CH
TEMP: DSW 1
RESULT: DSW 1
CSEG AT 0FF2080H
. ;some code
.;
.;
SUBB: PUSHA ;save flags, disable interrupts
LD TEMP,#1234H ;
EST TEMP,010600H ;store temp value in 010600H
ADD RESULT,TEMP,#4000H ;do something with registers
EST RESULT,010602H ;store result in 010602H
. ;more eld/est instructions
.;
.;
POPA ;restore flags and interrupts
RET ;
. ;more code
.;
.;
DONE: BR DONE
END
A2514-01
From CPU 16-bit Data Address Register
23 16 15 0
From EP_REG 16-bit Data Address Register
23 16 15 0
Nonextended Address
Extended Address