![](http://datasheet.mmic.net.cn/370000/UPD17120_datasheet_16743697/UPD17120_7.png)
– ii –
5.1.5
5.1.6
General Data Memory .........................................................................................................
Uninstalled Data Memory ...................................................................................................
33
33
CHAPTER 6 STACK ........................................................................................................................
35
6.1
6.2
6.3
6.4
6.5
6.6
STACK CONFIGURATION................................................................................................
FUNCTIONS OF THE STACK...........................................................................................
ADDRESS STACK REGISTER ..........................................................................................
INTERRUPT STACK REGISTER .......................................................................................
STACK POINTER (SP) AND INTERRUPT STACK REGISTER.......................................
STACK OPERATION DURING SUBROUTINES, TABLE REFERENCES,
AND INTERRUPTS ............................................................................................................
6.6.1
Stack Operation during Subroutine Calls (CALL) and Returns (RET, RETSK) ..................
6.6.2
Stack Operation during Table Reference (MOVT DBF, @AR) ...........................................
6.6.3
Executing RETI Instruction..................................................................................................
STACK NESTING LEVELS AND THE PUSH AND POP INSTRUCTIONS ...................
35
35
36
36
36
37
37
38
39
39
6.7
CHAPTER 7 SYSTEM REGISTER (SYSREG).................................................................................
41
7.1
7.2
SYSTEM REGISTER CONFIGURATION..........................................................................
ADDRESS REGISTER (AR)...............................................................................................
7.2.1
Address Register Configuration..........................................................................................
7.2.2
Address Register Functions................................................................................................
WINDOW REGISTER (WR)...............................................................................................
7.3.1
Window Register Configuration..........................................................................................
7.3.2
Window Register Functions................................................................................................
BANK REGISTER (BANK).................................................................................................
INDEX REGISTER (IX) AND DATA MEMORY ROW ADDRESS POINTER
(Memory Pointer: MP) ....................................................................................................
7.5.1
Index Register (IX) ...............................................................................................................
7.5.2
Data Memory Row Address Pointer (Memory Pointer: MP) ...........................................
7.5.3
MPE=0 and IXE=0 (No Data Memory Modification) .........................................................
7.5.4
MPE=1 and IXE=0 (Diagonal Indirect Data Transfer) ........................................................
7.5.5
MPE=0 and IXE=1 (Index Modification).............................................................................
GENERAL REGISTER POINTER (RP) ..............................................................................
7.6.1
General Register Pointer Configuration..............................................................................
7.6.2
Functions of the General Register Pointer.........................................................................
PROGRAM STATUS WORD (PSWORD) ........................................................................
7.7.1
Program Status Word Configuration ..................................................................................
7.7.2
Functions of the Program Status Word .............................................................................
7.7.3
Index Enable Flag (IXE) .......................................................................................................
7.7.4
Zero Flag (Z) and Compare Flag (CMP) ..............................................................................
7.7.5
Carry Flag (CY) .....................................................................................................................
7.7.6
Binary-Coded Decimal Flag (BCD) ......................................................................................
7.7.7
Caution on Use of Arithmetic Operations on the Program Status Word .........................
CAUTIONS ON USE OF THE SYSTEM REGISTER .......................................................
7.8.1
Reserved Words for Use with the System Register.........................................................
7.8.2
Handling of System Register Addresses Fixed at 0..........................................................
41
43
43
43
45
45
45
46
7.3
7.4
7.5
47
47
47
50
52
54
59
59
60
61
61
62
63
63
64
64
64
65
65
67
7.6
7.7
7.8