NEC PD17062 Datasheet page 92

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

Advertisement

10.3.2 Example Table Referencing Program
This section shows an example table referencing program.
Example
P0A
MEM
P0B
MEM
P0C
MEM
ORG
0000H
START :
BR
MAIN
DATA :
DW
0001H
DW
0002H
DW
0004H
DW
0008H
DW
0010H
DW
0020H
DW
0040H
DW
0080H
DW
0100H
DW
0200H
DW
0400H
DW
0800H
MAIN :
BANK0
SET4
P0ABIO3, P0ABIO2, P0ABIO1, P0ABIO0
SET4
P0BBIO3, P0BBIO2, P0BBIO1, P0BBIO0
MOV
RPL,
MOV
AR1,
MOV
AR0,
LOOP :
#
;
MOVT
DBF,
$
;
LD
P0A,
LD
P0B,
LD
P0C,
ADD
AR0,
ADDC
AR1,
SKNE
AR0,
MOV
AR0,
BR
LOOP
92
0.70H
;
0.71H
;
0.72H
;
; Constant data
;
;
;
;
;
;
;
;
;
;
;
; Built-in macro
#1110B
; Sets general-purpose register to row address 7H of BANK0 .
#(.DL.DATA SHR 4 AND 0FH)
#(.DL.DATA SHR 0 AND 0FH)
; Sets address register to 0001H.
@AR
; Transfers the contents of the ROM specified by AR to data
; buffer.
DBF2
; Transfers the contents of data buffer to Port0A (70H),
DBF1
; Port0B(71H), and Port0C (72H) port data registers.
DBF0
#1
; Increments the contents of data register by one.
#0
#0CH
; Writes 0 in AR0 when the value of AR0 reaches 0CH.
#0
;
PD17062

Advertisement

Table of Contents
loading

Table of Contents