User guide

32
SmartBook for Renesas R8C/Tiny Microcontrollers
www.MightyMicons.com
takes more code space, varying from two to eight bytes. On
the other hand, the zero format requires least amount of code,
may be a single byte to define the instruction.
3.17.1 Generic Format:
This generic format can be used to define almost all the
instructions of the micon. It takes two to eight bytes of code space.
This format requires two bytes to define the opcode and zero to three
bytes to define the source and then zero to three bytes to indicate the
destination of the results. If both the source and destination are the registers,
then the length of the instruction comes down to two bytes. In another scenario,
if the source operand uses the relative addressing, then the instruction length will
be increased either by three or four bytes. The displacement used in the relative
addressing may add one or two bytes to the basic opcode.
3.17.2 Quick Format:
The quick format takes about two to four instruction bytes. This format defines
the opcode in two bytes and up to two bytes to indicate the destination. The
source operand is always an immediate data defined using four bits with a range
of either -7 to + 8 or -8 to +7.
This immediate data is presented in the second byte of the opcode. If the
destination operand is a register, then the instruction length becomes only two
bytes.
3.17.3 Short Format:
This format contains an opcode in a single byte and zero to two source bytes
along with zero to two destination bytes.
3.17.4 Zero Format:
This format has one single byte opcode and zero to two destination bytes. When
using this format, addressing modes are limited. The source for this format is
always an immediate data with zero value. The destination is indicated by a two
byte data.
The generic for-
mat takes more
code space,
varying from
two to eight
bytes. The zero format requires
least amount of code, may
be a single byte to de-
fine the instruc-
tion.
D
a
t
a
4
D
e
s
i
g
n