CHAPTER 7 SYSTEM REGISTER (SYSREG)
66
By using these macro instructions, data memory can be handled as flags as shown below in
Example 3
.
The functions of the program status word and the memory pointer enable flag are defined in bit units (flag units)
and each bit has a reserved word MPE, BCD, CMP, CY, Z and IXE defined for it.
If these flag reserved words are used, the incorporated macro instructions can be used as shown in
Example
4
.
Example 3.
F0003
FLG 0.00.3
; Flag symbol definition
SET1 F0003
; Incorporated macro
Expanded macro
OR
.MF.F0003 SHR 4, #.DF.F0003 AND 0FH
; Set bit 3 of address 00H of BANK0
Example 4.
SET1 BCD
; Incorporated macro
Expanded macro
OR
.MF.BCD SHR 4, #.DF.BCD AND 0FH
; Set the BCD flag
; BCD is defined as "BCD FLG 0.7EH.0"
CLR2 Z, CY
; Identical address flag
Expanded macro
AND
.MF.Z SHR 4, #.DF. (NOT (Z OR CY) AND 0FH)
CLR2 Z, BCD
; Different address flag
Expanded macro
AND
.MF.Z SHR 4, #.DF. (NOT Z AND 0FH)
AND
.MF.BCD SHR 4, #.DF. (NOT BCD AND 0FH)
Summary of Contents for mPD17120 Subseries
Page 15: ... x MEMO ...
Page 23: ... MEMO 8 ...
Page 45: ... MEMO 30 ...
Page 49: ... MEMO 34 ...
Page 55: ... MEMO 40 ...
Page 93: ... MEMO 78 ...
Page 99: ... MEMO 84 ...
Page 102: ...CHAPTER 11 ARITHMETIC AND LOGIC UNIT 87 MEMO ...
Page 119: ... MEMO 104 ...
Page 175: ... MEMO 160 ...
Page 199: ... MEMO 184 ...
Page 265: ... MEMO 250 ...
Page 281: ...266 MEMO ...
Page 285: ... MEMO 270 ...
Page 289: ... MEMO 274 ...