English
Language : 

SH-2A Datasheet, PDF (126/501 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family
Section 6 Instruction Descriptions
Operation
CLIPUB(long n) /* CLIPU.B Rn*/
{
if ( R[n] > 0x000000FF)
{
R[n]=0x000000FF;
CS=1;
}
PC+2;
}
CLIPUW(long n) /* CLIPU.W Rn*/
{
if ( R[n] > 0x0000FFFF)
{
R[n]=0x0000FFFF;
CS=1;
}
PC+2;
}
Examples:
CLIPU.B R0
CLIPU.B R1
CLIPU.W R0
CLIPU.W R1
; Before execution: R0 = H'0000000F, CS = 0
; After execution: R0 = H'0000000F, CS = 0
; Before execution: R1 = H'00000100, CS = 0
; After execution: R1 = H'000000FF, CS = 1
; Before execution: R0 = H'00000FFF, CS = 0
; After execution: R0 = H'00000FFF, CS = 0
; Before execution: R1 = H'00010000, CS = 0
; After execution: R1 = H'0000FFFF, CS = 1
Rev. 3.00 Jul 08, 2005 page 112 of 484
REJ09B0051-0300