Usage Notes; Note On Tas Instruction Usage; Note On Stm/Ldm Instruction Usage; Note On Bit Manipulation Instructions - Renesas H8S Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for H8S Series:
Table of Contents

Advertisement

Section 2 CPU
2.9

Usage Notes

2.9.1

Note on TAS Instruction Usage

To use the TAS instruction, use registers ER0, ER1, ER4, and ER5.
The TAS instruction is not generated by the Renesas Technology H8S and H8/300 series C/C++
compilers. When the TAS instruction is used as a user-defined intrinsic function, registers ER0,
ER1, ER4, and ER5 should be used.
2.9.2

Note on STM/LDM Instruction Usage

Since the ER7 register is used as the stack pointer in an STM/LDM instruction, it cannot be used
as a register that allows save (STM) or restore (LDM) operation. Two to four registers can be
saved/restored by single STM/LDM instruction. Available registers are listed below.
Two: ER0 and ER1, ER2 and ER3, ER4 and ER5
Three: ER0 to ER2, ER4 to ER6
Four: ER0 to ER3
The STM/LDM instruction with ER7 is not created by the Renesas Technology H8S or H8/300
series C/C++ compilers.
2.9.3

Note on Bit Manipulation Instructions

The BSET, BCLR, BNOT, BST, and BIST instructions read data in byte units, manipulate the
data of the target bit, and write data in byte units. Special care is required when using these
instructions in cases where a register containing a write-only bit is used or a bit is directly
manipulated for a port.
In addition, the BCLR instruction can be used to clear the flag of the internal I/O register. In this
case, if the flag to be cleared has been set to 1 by an interrupt processing routine, the flag need not
be read before executing the BCLR instruction.
Rev. 3.00 Jul. 14, 2005 Page 56 of 986
REJ09B0098-0300

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2100 seriesH8s/2114rR4f2114r

Table of Contents