
2 6
µPD750008 USER'S MANUAL
(2) 4-bit direct addressing (mem)
In this addressing mode, the operand of an instruction directly specifies any area in the data memory space
in units of four bits.
As with the 1-bit direct addressing mode, in the MBE = 0 mode, a fixed space consisting of the static RAM
area ranging from 000H to 07FH and the peripheral hardware area ranging from F80H to FFFH can be
addressed. In the MBE = 1 mode, MB = MBS, and specifiable data memory space can be expanded to
the entire space.
This addressing mode can be applied to the MOV, XCH, INCS, IN, and OUT instructions.
Caution Less efficient program processing results if data associated with an I/O port is stored in
the static RAM area of bank 1 as in Example 1. The modification of the MBS, as contained
in Example 2, becomes unnecessary in the programming if data associated with an I/O
port is stored at addresses 00H to 7FH of bank 0.
Examples 1. The data contained in BUFF is output on port 5.
BUFF
EQU
11AH
; BUFF located at address 11AH
SET1
MBE
; MBE <– 1
SEL
MB1
; MBS <– 1
MOV
A,BUFF
; A <– (BUFF)
SEL
MB15
; MBS <– 15
OUT
PORT5,A
; PORT5 <– A
2. Data on port 4 is entered, and is saved in DATA1.
DATA1
EQU
5FH
; DATA1 located at address 5FH
CLR1
MBE
; MBE <– 0
IN
A,PORT4
; A <– PORT4
MOV
DATA1,A
; (DATA1) <– A
(3) 8-bit direct addressing (mem)
In this addressing mode, the operand of an instruction directly specifies any area in the data memory space
in units of eight bits.
The operand can specify an even address. The 4-bit data at the address specified in the operand and
the 4-bit data at the address incremented by 1 are processed as a pair on an 8-bit basis with the 8-bit
accumulator (XA register pair).
A memory bank is specified in the same way as the 4-bit direct addressing.
This addressing mode can be applied to the MOV, XCH, IN, and OUT instructions.
Example 1. Eight-bit data from port 4 and port 5 is transferred to addresses 20H and 21H.
DATA
EQU
020H
CLR1
MBE
; MBE <– 0
IN
XA,PORT4 ; X <– PORT5 , A <– PORT4
MOV
DATA,XA
; (21H) <– X, (20H) <– A
Summary of Contents for PD750004
Page 8: ... MEMO ...
Page 20: ... xii MEMO ...
Page 234: ...214 µPD750008 USER S MANUAL MEMO ...
Page 244: ...224 µPD750008 USER S MANUAL MEMO ...
Page 248: ...228 µPD750008 USER S MANUAL MEMO ...
Page 254: ...234 µPD75008 USER S MANUAL MEMO ...
Page 328: ...308 µPD750008 USER S MANUAL MEMO ...
Page 330: ...310 µPD750008 USER S MANUAL MEMO ...
Page 342: ...322 µPD750008 USER S MANUAL MEMO ...