NEC PD17062 Datasheet page 105

Mos integrated circuit 4-bit single-chip microcontroller containing pll frequency synthesizer and image display controller
Table of Contents

Advertisement

10.6.2 Peripheral Register Addresses and Reserved Words
When a 17K series assembler is used, no error is generated when peripheral address "p" is specified directly
(with a numerical value) in PUT p, DBF or GET DBF, p as shown in Example 1.
However, to reduce program bugs, this method should be avoided.
Therefore, the peripheral addresses should be symbolically defined with symbol definition instructions (an
assembler pseudo instructions), as shown in Example 2.
To simplify symbol definition, peripheral addresses are predefined in the assembler as reserved words.
Therefore, if reserved words are used, a program can be written without performing symbol definition, as
shown in Example 3.
The reserved words of peripheral registers are shown in the Symbol field in Table 10-1 and the Symbol
field in Figs. 10-4 to 10-10.
Example 1.
PUT
GET
2.
SIO0DATA
PUT
3.
PUT
02H,
DBF
; The assembler does not generate an error if peripheral
DBF,
03H
; addresses are directly specified by 02H and 03H. How
; ever, to reduce program bugs, this method should be
; avoided.
DAT
03H
; Assigns SIO0DATA to 03H using a symbol definition
SIO0DATA, DBF
; instruction.
SIO0SFR
; If reserved word SIO0SFR is used, symbol definition is
; unnecessary.
PD17062
105

Advertisement

Table of Contents
loading

Table of Contents