NEC PD17062 User Manual
Page 105
105
µ
PD17062
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
02H,
DBF
; The assembler does not generate an error if peripheral
GET
DBF,
03H
; addresses are directly specified by 02H and 03H. How
; ever, to reduce program bugs, this method should be
; avoided.
2.
SIO0DATA
DAT
03H
; Assigns SIO0DATA to 03H using a symbol definition
PUT
SIO0DATA, DBF
; instruction.
3.
PUT
SIO0SFR
; If reserved word SIO0SFR is used, symbol definition is
; unnecessary.