Bit Data Access In Bit Manipulation Instructions - Hitachi H8/300H Series Programming Manual

Table of Contents

Advertisement

2.1.6 Bit Data Access in Bit Manipulation Instructions

Bit data is accessed as the n-th bit (n = 0, 1, 2, 3, ..., 7) of a byte operand in a general register or
memory. The bit number is given by 3-bit immediate data, or by the lower 3 bits of a general
register value.
Example 1: To set bit 3 in R2H to 1
Example 2: To load bit 5 at address H'FFFF02 into the bit accumulator
The operand size and addressing mode are as indicated for register or memory operand data.
BSET R1L, R2H
R1L
Don't care
R2H
0
1
1
BLD #5, @FFFF02
#5
H'FF02
1
0
1
Load
0
1
1
Bit number
0
0
1
0
1
Set to 1
0
0
1
1
40
0
C

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents