
Q&A-5
CPU
Q
A
How does the instruction code become if I use a bit instruction in absolute addressing ?
An explanation is given here by taking BSET bit,base:16 as an example.
This instruction is a 4-byte instruction. The 2 higher-order bytes of the instruction code indicate
operation code, and the 2 lower-order bytes make up addressing mode to expresse bit,base:16.
The relation between the 2 lower-order bytes and bit,base:16 is as follows.
2 lower-order bytes = base:16 8 + bit
For example, in the case of BSET 2,0AH (setting bit 2 of address 000A
16
to 1), the 2 lower-order
bytes turn to A 8 + 2 = 52H.
In the case of BSET 18,8H (setting the 18th bit from bit 0 of address 0008
16
to 1), the 2 lower-order
bytes turn to 8 8 + 18 = 52H, which is equivalent to BSET 2,AH.
The maximum value of base:16 8 + bit, FFFFH, indicates bit 7 of address 1FFF
16
. This is the
maximum bit you can specify when using the bit instruction in absolute addressing.
Содержание R8C/Tiny Series
Страница 50: ...Chapter 3 Functions 3 1 Guide to This Chapter 3 2 Functions...
Страница 151: ...134 Chapter 3 Functions 3 2 Functions Blank for page layout...
Страница 152: ...Chapter 4 Instruction Code Number of Cycles 4 1 Guide to This Chapter 4 2 Instruction Code Number of Cycles...
Страница 278: ...Chapter 6 Calculation Number of Cycles 6 1 Instruction queue buffer...
Страница 287: ...Glossary 1 Glossary Technical terms used in this software manual are explained below They are good in this manual only...
Страница 291: ...Symbol 1 Table of symbols Symbols used in this software manual are explained below They are good in this manual only...
Страница 295: ...REVISION HISTORY R8C Tiny Series SOFTWARE MANUAL Rev Date Description Page Summary B 1 1 00 Jun 19 03 First Edition...
Страница 297: ...R8C Tiny Series Software Manual 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan...