CHAPTER 9 REGISTER FILE (RF)
73
9.2.3 Register File Manipulation Instructions
Reading and writing data to and from the register file is done using the window register (WR: address 78H) located
in the system register.
Reading and writing of data is performed using the following dedicated instructions:
PEEK WR, rf: Read the data in the address specified by rf and put it into WR.
POKE rf, WR: Write the data in WR into the address specified by rf.
Below is an example using the PEEK and POKE instructions.
Example
M030
MEM
0.30H
; Address 30H of the data memory is used as save area of WR.
M032
MEM
0.32H
; Address 32H of the data memory is used as operation area of WR.
RF11
MEM
0.91H
; Symbol definition
RF33
MEM
0.B3H
; Register file addresses 00H to 3FH must be defined with
RF70
MEM
0.70H
; symbols as BANK0 address 80H to BFH.
RF73
MEM
0.73H
; Refer to
9.4 NOTES ON USING THE REGISTER FILE
for details.
; BANK0
<1>
PEEK
WR, RF11
;
CLR1
MPE
; Shows the example of saving WR contents to the general data
CLR1
IXE
; memory (addresses 00H to 3FH). For example, it shows the
OR
RPL, #0110B ; case of saving WR contents to address 30H of the data memory
<2>
LD
M030, WR
; without address modification.
<3>
POKE
RF73, WR
; Data memory of addresses 40H to 7FH and control register can
<4>
PEEK
WR, RF70
; transmit/receive data to/from WR directly by PEEK and POKE
<5>
POKE
RF33, WR
; instruction.
<6>
ST
WR, M032
;
Содержание mPD17120 Subseries
Страница 15: ... x MEMO ...
Страница 23: ... MEMO 8 ...
Страница 45: ... MEMO 30 ...
Страница 49: ... MEMO 34 ...
Страница 55: ... MEMO 40 ...
Страница 93: ... MEMO 78 ...
Страница 99: ... MEMO 84 ...
Страница 102: ...CHAPTER 11 ARITHMETIC AND LOGIC UNIT 87 MEMO ...
Страница 119: ... MEMO 104 ...
Страница 175: ... MEMO 160 ...
Страница 199: ... MEMO 184 ...
Страница 265: ... MEMO 250 ...
Страница 281: ...266 MEMO ...
Страница 285: ... MEMO 270 ...
Страница 289: ... MEMO 274 ...