44
µ
PD78214 Sub-Series
To access the space, specify the bank to be used (high-order four bits of address, A16 to A19) in the bank register
(P60 to P63 of register P6, or PM60 to PM63 of register PM6). Then, execute an instruction which allows extended
addressing. The high-order four bits of address output from pins P60 to P63 are valid only while an instruction
that allows extended addressing is being executed.
Because two bank registers are provided, two data banks can always be used. To select either of the two bank
registers, specify the operand of the instruction with or without &. If & is added, register P6 is selected as the bank
register. If & is omitted, register PM6 is selected as the bank register.
If one of the two banks is specified as the main data bank in a RAM area, and if the other bank is specified as the
sub-data bank in a data ROM area, for example, the data read from the data ROM (for example, character data for
the printer) can easily be enlarged or reduced in size and stored in the RAM.
Example Specifying bank 1 as the main bank and bank 5 as the sub-bank and transferring the data from bank 5 to bank 1
MOV MM, #47H ; Selects memory expansion mode.
MOV PM6, #1H ;Sets the main bank register (PM6).
MOV P6, #5H ; Sets the sub-bank register (P6).
MOV B, #0FFH ; Sets the loop counter.
LOOP :
MOV A, &[HL+] ; Reads data from bank 5. (The contents of register P6 are added as the most significant address.)
MOV [DE+], A ;Stores the data in bank 1. (The contents of register PM6 are added as the most significant address.)
DBNZ B, $LOOP ; Repetition
Fig. 3-5 Sample Data Transfer between Banks
Remarks 1. The MOV [DE+], A and MOV A, &[HL+] instructions are both held in bank 0.
2. The instruction that uses register PM6 as the bank register requires a shorter instruction code and shorter execution time than
that which uses register P6. The instruction that manipulates register P6 requires a shorter instruction code and shorter execution
time than that which manipulates register PM6. It is, therefore, efficient to use PM6 as the main bank register that specifies the
bank accessed most frequently and P6 as the sub-bank register that frequently specifies different banks.
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
10000H
1FFFFH
50000H
5FFFFH
Bank 1
(main data bank)
Bank 5
(auxiliary data bank)
MOV [DE+], A MOV A, &[HL+]
A register