Renesas Renasas Single-Chip Microcomputer SH7086 Manual de usuario

Busca en linea o descarga Manual de usuario para Redes Renesas Renasas Single-Chip Microcomputer SH7086. M16C/60, M16C/20, M16C/Tiny Series Software Manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 308
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 0
To our customers,
Old Company Name in Catalogs and Other Documents
On April 1
st
, 2010, NEC Electronics Corporation merged with Renesas Technology
Corporation, and Renesas Electronics Corporation took over all the business of both
companies. Therefore, although the old company name remains in this document, it is a valid
Renesas Electronics document. We appreciate your understanding.
Renesas Electronics website: http://www.renesas.com
April 1
st
, 2010
Renesas Electronics Corporation
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry
.
Vista de pagina 0
1 2 3 4 5 6 ... 307 308

Indice de contenidos

Pagina 1 - To our customers

To our customers, Old Company Name in Catalogs and Other Documents On April 1st, 2010, NEC Electronics Corporation merged with Renesas Technology C

Pagina 2

Quick Reference-2MOVDir MOVHH MOVHL MOVLH MOVLLMULMULUNEGNOPNOTORPOPPOPCPOPMPUSHPUSHAPUSHCPUSHMREITRMPAROLCRORC 96 97 98 9910010110310

Pagina 3 - M16C/60, M16C/20, M16C/Tiny

82Chapter 3 Functions3.2 Functions[ Operation ]When jump distance specifier (.length) is (.W) When jump distance specifier (.length) is (.A)PC

Pagina 4

83Chapter 3 Functions3.2 FunctionsJuMP Special pageJump to special page[ Syntax ]JMPS srcJMPS JMPS[ Operation ]PCH 0F16PCML M( FFFFE16 – src

Pagina 5 - Using This Manual

84Chapter 3 Functions3.2 FunctionsJump SubRoutineSubroutine call[ Syntax ]JSR(.length) label[ Flag Change ][ Description Example ][ Related Instruc

Pagina 6 - M16C Family Documents

85Chapter 3 Functions3.2 FunctionsUIOBSZDCIndirect subroutine call[ Related Instructions ] JSR,JSRSW , AJump SubRoutine IndirectJSRI190[ Instructio

Pagina 7 - Table of Contents

86Chapter 3 Functions3.2 FunctionsJump SubRoutine Special pageSpecial page subroutine callJSRS JSRS[ Syntax ]JSRS src[ Function ]• This instruction

Pagina 8

87Chapter 3 Functions3.2 FunctionsLoaD Control registerTransfer to control register[ Flag Change ][ Description Example ][ Related Instructions ] P

Pagina 9 - Quick Reference-1

88Chapter 3 Functions3.2 FunctionsRegister information for the task whose task number = 0. (See the above diagram.)SP correction value for the tas

Pagina 10 - Quick Reference-2

89Chapter 3 Functions3.2 FunctionsLoaD from EXtra far data areaTransfer from extended data area[ Flag Change ][ Description Example ][ Related Inst

Pagina 11 - Quick Reference by Function

90Chapter 3 Functions3.2 FunctionsLoaD INTB registerTransfer to INTB register[ Flag Change ][ Description Example ][ Related Instructions ] LDC,STC

Pagina 12 - Quick Reference-4

91Chapter 3 Functions3.2 FunctionsLoaD Interrupt Permission LevelSet interrupt enable level[ Syntax ]LDIPL src[ Flag Change ][ Description Example

Pagina 13 - Quick Reference-5

Quick Reference-3MOV TransferMOVA Transfer effective addressMOVDir Transfer 4-bit dataPOP Restore register/memoryPOPM Restore multiple registersPUSH S

Pagina 14 - Quick Reference-6

923.2 FunctionsChapter 3 FunctionsMOVeTransfer[ Related Instructions ] LDE,STE,XCHG[ Description Example ][ Selectable src/dest ][ Function ]MOV MOV

Pagina 15 - Quick Reference-7

933.2 FunctionsChapter 3 Functions[src/dest Classified by Format]G formatsrc destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0*1A1/A1

Pagina 16 - Quick Reference-8

943.2 FunctionsChapter 3 FunctionsMOVe effective AddressTransfer effective address[ Flag Change ][ Description Example ][ Related Instructions ] PUS

Pagina 17 - Quick Reference-9

953.2 FunctionsChapter 3 FunctionsMOVe nibbleTransfer 4-bit dataMOVDirMOVDir[ Operation ][ Syntax ]MOVDirsrc,dest[ Description Example ]DirOperation

Pagina 18 - Quick Reference-10

963.2 FunctionsChapter 3 FunctionsMULtipleSigned multiply[ Syntax ]MUL.size src,dest[ Description Example ][ Related Instructions ] DIV,DIVU,DIVX,MU

Pagina 19 - Overview

973.2 FunctionsChapter 3 Functionssrc destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0*1A1/A1*1[A0] [A1] A0/A0*1A1/A1 [A0] [A1]dsp:8

Pagina 20 - 1.1.2 Speed performance

983.2 FunctionsChapter 3 FunctionsNEGateTwo’s complement[ Syntax ]NEG.size dest[ Flag Change ][ Description Example ][ Related Instructions ] NOT[ F

Pagina 21 - 1.2 Address Space

993.2 FunctionsChapter 3 Functions No OPerationNo operation[ Flag Change ][ Description Example ]NOP[ Function ]NOP NOP[ Syntax ]NOP• This instructi

Pagina 22 - 1.3 Register Configuration

1003.2 FunctionsChapter 3 FunctionsNOTInvert all bits[ Related Instructions ] NEGNOT NOT[ Operation ]________dest dest[ Function ]• This in

Pagina 23

101Chapter 3 Functions3.2 Functions[ Instruction Code/Number of Cycles ]Page=ORLogically OR[ Description Example ]OR.B Ram:8[SB],R0LOR.B:G A0,R0L ;

Pagina 24 - 1.4 Flag Register (FLG)

Quick Reference-4116DADD Decimal add without carryDEC DecrementDIV Signed divideDIVU Unsigned divideDIVX Singed divideDSBB Decimal subtract with borro

Pagina 25 - 1.4.11 Bit 15: Reserved area

102Chapter 3 Functions3.2 Functions[src/dest Classified by Format]G formatsrc destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0*1A1

Pagina 26 - 1.5 Register Bank

103Chapter 3 Functions3.2 FunctionsPOPRestore register/memory[ Flag Change ]POP.B R0LPOP.W A0[ Related Instructions ] PUSH,POPM,PUSHM[ Selectable d

Pagina 27

104Chapter 3 Functions3.2 FunctionsPOP Control registerRestore control register[ Flag Change ][ Description Example ][ Related Instructions ] PUSH

Pagina 28 - 1.7 Data Types

105Chapter 3 Functions3.2 FunctionsPOP MultipleRestore multiple registers[ Description Example ][ Related Instructions ] POP,PUSH,PUSHM[ Selectable

Pagina 29 - 1.7.2 Decimal

106Chapter 3 Functions3.2 FunctionsPUSHSave register/memory/immediate data[ Flag Change ][ Description Example ][ Related Instructions ] POP,POPM,

Pagina 30 - 1.7.3 Bits

107Chapter 3 Functions3.2 FunctionsPUSH effective AddressSave effective address [ Flag Change ][ Description Example ][ Related Instructions ] MOV

Pagina 31

108Chapter 3 Functions3.2 FunctionsPUSH Control registerSave control register[ Syntax ]PUSHC src[ Flag Change ][ Description Example ]PUSHC SB[ Re

Pagina 32

109Chapter 3 Functions3.2 FunctionsPUSH MultipleSave multiple registers[ Syntax ]PUSHM src[ Description Example ][ Related Instructions ] POP,PUSH,

Pagina 33 - 1.7.4 String

110Chapter 3 Functions3.2 FunctionsREturn from InTerruptReturn from interrupt[ Syntax ]REIT[ Flag Change ][ Description Example ][ Function ]REIT

Pagina 34 - 1.8 Data Arrangement

1113.2 FunctionsChapter 3 FunctionsRepeat MultiPle & AdditionCalculate sum-of-products[ Description Example ]RMPA RMPA[ Syntax ]RMPA.sizeB , W

Pagina 35

Quick Reference-5Other132133LDCTX Restore contextLDINTB Transfer to INTB registerLDIPL Set interrupt enable levelNOP No operationPOPC Restore control

Pagina 36 - 1.9 Instruction Format

1123.2 FunctionsChapter 3 FunctionsROtate to Left with CarryRotate left with carryC[ Description Example ][ Related Instructions ] RORC,ROT,SHA,SH

Pagina 37 - 1.10 Vector Table

1133.2 FunctionsChapter 3 FunctionsROtate to Right with CarryRotate right with carry[ Syntax ]RORC.size dest[ Flag Change ][ Related Instructions

Pagina 38 - 1.10.2 Variable Vector Table

1143.2 FunctionsChapter 3 FunctionsROTateRotate[ Related Instructions ] ROLC,RORC,SHA,SHLROT ROT[ Syntax ]ROT.size src,destB , W• This instruction

Pagina 39 - Addressing Modes

1153.2 FunctionsChapter 3 FunctionsReTurn from SubroutineReturn from subroutine[ Flag Change ][ Description Example ]RTSRTS RTS[ Syntax ]RTS[ Oper

Pagina 40 - 2.1 Addressing Modes

1163.2 FunctionsChapter 3 FunctionsSuBtract with BorrowSubtract with borrow[ Syntax ]SBB.size src,dest[ Operation ]___dest dest – s

Pagina 41 - 2.2 Guide to This Chapter

1173.2 FunctionsChapter 3 FunctionsSuBtract then Jump on Not ZeroSubtract & conditional jump[ Selectable src/dest/label ][ Related Instruction

Pagina 42 - Chapter 2 Addressing Modes

1183.2 FunctionsChapter 3 FunctionsSHift ArithmeticShift arithmetic[ Syntax ]SHA.size src,dest[ Related Instructions ] ROLC,RORC,ROT,SHLSHAB , W ,

Pagina 43

1193.2 FunctionsChapter 3 FunctionsSHift LogicalShift logical[ Syntax ]SHL.size src,dest[ Related Instructions ] ROLC,RORC,ROT,SHASHL SHLB , W , L

Pagina 44

1203.2 FunctionsChapter 3 FunctionsString MOVe Backward Transfer string backward[ Syntax ]SMOVB.size[ Description Example ]SMOVB.B[ Related Instru

Pagina 45

1213.2 FunctionsChapter 3 FunctionsString MOVe ForwardTransfer string forward[ Syntax ]SMOVF.size[ Description Example ][ Related Instructions ] S

Pagina 46

Quick Reference-6R0L/R0R0H/R1R1L/R2R1H/R3An[An]dsp:8[An]dsp:8[SB/FB]dsp:16[An]dsp:16[SB]abs16#IMM8#IMM16#IMM20#IMMSee pagefor functionSee page forinst

Pagina 47

122Chapter 3 Functions3.2 FunctionsString SToReStore string[ Function ][ Flag Change ][ Description Example ]SSTR.B[ Related Instructions ] SMOVB,

Pagina 48

123Chapter 3 Functions3.2 FunctionsTransfer from control registerSTore from Control register[ Syntax ]STC src,dest[ Description Example ][ Related

Pagina 49

124Chapter 3 Functions3.2 FunctionsSTore ConTeXtSave contextSTCTX Ram,Rom_TBL[ Related Instructions ] LDCTX[ Flag Change ]STCTX STCTX[ Syntax ]STC

Pagina 50

125Chapter 3 Functions3.2 FunctionsSTore to EXtra far data areaTransfer to extended data area[ Flag Change ][ Description Example ]STE.B R0L,[A1A0

Pagina 51 - Functions

126Chapter 3 Functions3.2 FunctionsSTore on Not ZeroConditional transfer[ Function ][ Flag Change ][ Description Example ][ Related Instructions ]

Pagina 52 - 3.1 Guide to This Chapter

127Chapter 3 Functions3.2 FunctionsSTore on ZeroConditional transfer[ Syntax ]STZ src,dest[ Function ][ Flag Change ]• This instruction transfers

Pagina 53 - (3) Syntax

128Chapter 3 Functions3.2 Functions[ Instruction Code/Number of Cycles ]Page=STore on Zero eXtentionConditional transfer[ Syntax ]STZX src1,src2,d

Pagina 54

129Chapter 3 Functions3.2 Functions[ Selectable src/dest ]SUBtractSubtract without borrow[ Syntax ]SUB.size (:format) src,dest[ Operation ]dest

Pagina 55

130Chapter 3 Functions3.2 Functions[src/dest Classified by Format]G formatsrc destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0*1A1

Pagina 56 - Unconditional jump

131Chapter 3 Functions3.2 FunctionsTeSTTest[ Syntax ]TST.size src,dest[ Description Example ]TST.B #3,R0LTST.B A0,R0L ; A0's 8 low-order bits

Pagina 57 - Absolute value

Quick Reference-7LDINTBLDIPLMOV*1MOVAMOVDirMULMULUNEGNOTORPOPPOPM*1PUSHPUSHAPUSHM*1ROLCRORCROTSBBSBJNZ*1SHA*1SHL*1STC*1STCTX*1STE*1R0L/R0R0H/R1R1L/R2R

Pagina 58 - Add with carry

132Chapter 3 Functions3.2 FunctionsUNDefined instructionInterrupt for undefined instruction[ Syntax ]UND[ Flag Change ][ Description Example ]UND

Pagina 59 - ADCF ADCF

133Chapter 3 Functions3.2 FunctionsWAITWait[ Syntax ]WAIT[ Flag Change ][ Description Example ][ Function ]WAIT WAIT• This instruction halts progr

Pagina 60 - Add without carry

134Chapter 3 Functions3.2 FunctionseXCHanGeExchange[ Flag Change ][ Description Example ][ Function ][ Selectable src/dest ]XCHG XCHG[ Syntax ]XCH

Pagina 61

135Chapter 3 Functions3.2 FunctionseXclusive ORExclusive OR[ Syntax ]XOR.size src,dest[ Flag Change ][ Selectable src/dest ][ Description Example

Pagina 62 - ADJNZ ADJNZ

136Chapter 3 Functions3.2 Functions

Pagina 63 - Logically AND

Chapter 4Instruction Code/Number of Cycles4.1 Guide to This Chapter4.2 Instruction Code/Number of Cycles

Pagina 64

138Chapter 4 Instruction Code4.1 Guide to This Chapter4.1 Guide to This ChapterThis chapter describes instruction code and number of cycles for ea

Pagina 65 - BAND BAND

139Chapter 4 Instruction Code4.1 Guide to This Chapter(1) MnemonicShows the mnemonic explained in this page.(2) SyntaxShows an instruction syntax

Pagina 66 - Clear bit

140Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesABS(1) ABS.size destdest codedsp8)dsp16/abs16.size.B.WSIZE01dsp

Pagina 67 - Bit Move Condition

141Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cyclesdsp8dest codedsp16/abs16)src codedsp8)dsp16/abs16SRC/DESTsrc/de

Pagina 68 - Logically AND inverted bits

Quick Reference-8R0L/R0R0H/R1R1L/R2R1H/R3An[An]dsp:8[An]dsp:8[SB/FB]dsp:16[An]dsp:16[SB]abs16#IMM8#IMM16#IMM20#IMMSTNZSTZSTZXSUBTSTXCHGXOR134135126127

Pagina 69 - BNOR BNOR

142Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesADCF(1) ADCF.size destdest codedsp8)dsp16/abs16.size.B.WSIZE01d

Pagina 70 - BNOTBNOT

143Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesADD(2) ADD.size:Q #IMM, destdest codedsp8)dsp16/abs16.size.B.WS

Pagina 71 - BNTST BNTST

144Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesADDRndsp:8[SB/FB]011100101110111R0HR0Ldsp:8[SB]dsp:8[FB]abs16ab

Pagina 72 - Exclusive OR inverted bits

145Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesADD(4) ADD.size:G src, dest1010000SIZESRC DESTdsp8dest codedsp1

Pagina 73 - Logically OR bits

146Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles3/2[ Number of Bytes/Number of Cycles ]ADD#IMM8#IMM16.size.B.WS

Pagina 74 - Debug interrupt

147Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesADD(7) ADD.size:Q #IMM, SP[ Number of Bytes/Number of Cycles ]2

Pagina 75 - BSET BSET

148Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesADJNZ1111100SIZEIMM4 DEST(1) ADJNZ.size #IMM, dest, labeldest c

Pagina 76 - BTST BTST

149Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesAND0111011SIZE0 0 1 0 DEST(1) AND.size:G #IMM, destdest codedsp

Pagina 77 - BTSTC BTSTC

150Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(AND(3) AND.size:G src, dest1001000SIZESRC DESTdsp8dsp16/abs16)

Pagina 78 - BTSTS BTSTS

151Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(4) AND.B:S src, R0L/R0Hsrc codedsp8)abs16dsp:8[SB/FB]2/3Rn1/2a

Pagina 79 - Exclusive OR bits

Quick Reference-9ADD*1ADJNZ*1JCndJMPJMPI*1JSRJSRI*1LDC*1LDCTXLDE*1MOV*1POPCPOPM*1PUSHCPUSHM*1SBJNZ*1SHA*1SHL*1STC*1STCTX*1STE*1dsp:20[A0]dsp:20[A1]abs

Pagina 80 - Compare

152Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesBAND011111100100 SRC(1) BAND srcsrc codedsp8dsp16)[ Number of B

Pagina 81

153Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(2) BCLR:S bit, base:11[SB]BCLRdsp8dest code[ Number of Bytes/N

Pagina 82 - DADC DADC

154Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesBMCnddest4/7bit,base:8[SB/FB]4/104/64/6bit,Rn bit,An [An]bit,ba

Pagina 83 - DADD DADD

155Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesBMCnd011111011101 CND2/1BNAND(1) BNAND srcsrc codedsp8dsp16[ Nu

Pagina 84 - Decrement

156Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesBNOR011111100111 SRC(1) BNOR srcsrc codedsp8dsp16)[ Number of B

Pagina 85 - Signed divide

157Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesBNOT(2) BNOT:S bit, base:11[SB]dest codedsp8[ Number of Bytes/N

Pagina 86 - DIVU DIVU

158Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(1) BNXOR srcsrc codedsp8dsp16)[ Number of Bytes/Number of Cycl

Pagina 87 - DIVX DIVX

159Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesBRK(1) BRK00000000[ Number of Bytes/Number of Cycles ]1/27(1) B

Pagina 88 - DSBB DSBB

160Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(2) BSET:S bit, base:11[SB]dsp8dest code0 1 0 0 1 BIT[ Number o

Pagina 89 - DSUB DSUB

161Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cyclesdest codedsp8dsp16)BTST(2) BTST:S bit, base:11[SB]0 1 0 1 1 BIT

Pagina 90 - ENTER ENTER

Quick Reference-10BANDBCLRBMCndBNANDBNORBNOTBNTSTBNXORBORBSETBTSTBTSTCBTSTSBXORFCLRFSETbit,Rnbit,An[An]base:8[An]bit,base:8[SB/FB]base:16[An]bit,base:

Pagina 91 - EXITD EXITD

162Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesBTSTS0 1 1 1 1 1 1 0 0 0 0 1 DEST(1) BTSTS destdest codedsp8dsp

Pagina 92 - EXTS EXTS

163Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesCMP0111011SIZE1 0 0 0 DEST(1) CMP.size:G #IMM, destdest codedsp

Pagina 93 - Clear flag register bit

164Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesCMP(2) CMP.size:Q #IMM, destdest codedsp8)dsp16/abs16 0+1+2+3+

Pagina 94 - FSET FSET

165Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesCMP[ Number of Bytes/Number of Cycles ]dsp:8[SB/FB]3/3Rn2/1abs1

Pagina 95 - Increment

166Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesCMP1100000SIZESRC DEST(4) CMP.size:G src, destdsp8dest codedsp1

Pagina 96 - Interrupt by INT instruction

167Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(5) CMP.B:S src, R0L/R0HCMPsrc codedsp8)abs16DADC01111100111011

Pagina 97 - INTO INTO

168Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDADC(2) DADC.W #IMM16, R0[ Number of Bytes/Number of Cycles ]4/

Pagina 98 - Jump on condition

169Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDADC(4) DADC.W R1, R0[ Number of Bytes/Number of Cycles ]2/5DAD

Pagina 99 - Unconditional jump

170Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDADD(2) DADD.W #IMM16, R0#IMM16[ Number of Bytes/Number of Cycl

Pagina 100 - JMPI JMPI

171Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDADD(4) DADD.W R1, R0[ Number of Bytes/Number of Cycles ]2/5DEC

Pagina 101 - JMPS JMPS

Chapter 1Overview1.1 Features of M16C/60, M16C/20, M16C/Tiny series1.2 Address Space1.3 Register Configuration1.4 Flag Register (FLG)1.5 Register

Pagina 102 - Subroutine call

172Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDEC(2) DEC.W dest[ Number of Bytes/Number of Cycles ]1/1DIV(1)

Pagina 103 - Indirect subroutine call

173Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDIV(2) DIV.size srcdsp8src codedsp16/abs16)srcdsp:8[A0]dsp:8[A1

Pagina 104 - JSRS JSRS

174Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDIVU0111011SIZE1 1 0 0 SRC(2) DIVU.size srcdsp8src codedsp16/ab

Pagina 105 - Transfer to control register

175Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDIVX(2) DIVX.size srcdsp8src codedsp16/abs16)srcdsp:8[A0]dsp:8[

Pagina 106 - LDCTX LDCTX

176Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDSBB(2) DSBB.W #IMM16, R0#IMM16[ Number of Bytes/Number of Cycl

Pagina 107 - LoaD from EXtra far data area

177Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDSBB(4) DSBB.W R1, R0[ Number of Bytes/Number of Cycles ]2/4DSU

Pagina 108 - LDINTB LDINTB

178Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDSUB(2) DSUB.W #IMM16, R0#IMM16[ Number of Bytes/Number of Cycl

Pagina 109 - LDIPL LDIPL

179Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesDSUB(4) DSUB.W R1, R0[ Number of Bytes/Number of Cycles ]2/4(1)

Pagina 110 - Transfer

180Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesEXITD(1) EXITD[ Number of Bytes/Number of Cycles ]2/9EXTS(1) EX

Pagina 111 - Chapter 3 Functions

181Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesEXTS(2) EXTS.W R0[ Number of Bytes/Number of Cycles ]2/3[ Numbe

Pagina 112 - MOVA MOVA

Notice 1. All information included in this document is current as of the date this document is issued. Such information, however, is subject to chang

Pagina 113 - Transfer 4-bit data

2Chapter 1 Overview1.1 Features of M16C/60, M16C/20, M16C/Tiny seriesThe M16C/60, M16C/20, M16C/Tiny series are single-chip microcomputer developed f

Pagina 114 - Signed multiply

182Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesFSET(1) FSET dest[ Number of Bytes/Number of Cycles ]2/2INC(1)

Pagina 115 - MULU MULU

183Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesINC(2) INC.W destINT(1) INT #IMM11[ Number of Bytes/Number of C

Pagina 116 - Two’s complement

184Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesINTO(1) INTO[ Number of Bytes/Number of Cycles ]1/1JCnd(1) JCnd

Pagina 117 - No operation

185Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesJCnd(2) JCndlabeldsp8label code3/2[ Number of Bytes/Number of C

Pagina 118 - ________

186Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesJMP(2) JMP.B labellabel code[ Number of Bytes/Number of Cycles

Pagina 119 - Logically OR

187Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles[ Number of Bytes/Number of Cycles ]4/4(1) JMPI.W srcsrcdsp:8[A

Pagina 120

188Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesJMPI(2) JMPI.A srcJMPS(1) JMPS #IMM8#IMM8[ Number of Bytes/Numb

Pagina 121 - Restore register/memory

189Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesJSR(1) JSR.W labeldsp16 = address indicated by label – (start a

Pagina 122 - POPC POPC

190Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(1) JSRI.W src(2) JSRI.A srcsrcdsp:8[A0]dsp:8[A1]dsp:8[SB]dsp:8

Pagina 123 - POPM POPM

191Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesJSRS(1) JSRS #IMM8#IMM8[ Number of Bytes/Number of Cycles ]2/13

Pagina 124 - PUSH PUSH

3Chapter 1 OverviewThe SFR area in eachmodel extends towardlower-address locationsas much as available.The RAM area in eachmodel extends towardhigher-

Pagina 125 - PUSHA PUSHA

192Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesLDC(2) LDC src, destdsp8src codedsp16/abs16)[ Number of Bytes/N

Pagina 126 - PUSHC PUSHC

193Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesLDE(1) LDE.size abs20, destdestdsp:8[A0]dsp:8[A1]dsp:8[SB]dsp:8

Pagina 127 - PUSHM PUSHM

194Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesLDE(3) LDE.size [A1A0], destdest codedsp8)dsp16/abs16destdsp:8[

Pagina 128 - REIT REIT

195Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(1) LDIPL #IMM[ Number of Bytes/Number of Cycles ]2/2(1) MOV.si

Pagina 129 - RMPA RMPA

196Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOV1101100SIZEIMM4 DEST(2) MOV.size:Q #IMM, destdest codedsp8)d

Pagina 130 - ROLC ROLC

197Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOVdsp:8[SB/FB]3/2Rn2/1abs164/2dest[ Number of Bytes/Number of

Pagina 131 - RORC RORC

198Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOV(4) MOV.size:S #IMM, dest#IMM8#IMM16.size.B.WSIZE10DESTdestA

Pagina 132

199Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(MOV(6) MOV.size:G src, destdsp8dest codedsp16/abs16)src codeds

Pagina 133 - Return from subroutine

200Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOV(7) MOV.B:S src, destsrc codedsp8)abs16DESTdestA0A101MOV(8)

Pagina 134 - Subtract with borrow

201Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOV(9) MOV.B:S src, R0L/R0Hsrc codedsp8)abs16MOV(10) MOV.size:G

Pagina 135 - SBJNZ SBJNZ

4Chapter 1 Overview1.3 Register Configuration1.3 Register ConfigurationThe central processing unit (CPU) contains the 13 registers shown in Figure 1

Pagina 136 - Shift arithmetic

202Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOVMOVA(11) MOV.size:G src, dsp:8[SP]dest codedsp8)dsp8src code

Pagina 137 - Shift logical

203Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOVDir(1) MOVDirR0L, destdest codedsp8)dsp16/abs16b7 b0 b7 b00

Pagina 138 - SMOVB SMOVB

204Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMOVDir(2) MOVDirsrc, R0Ldest codedsp8)dsp16/abs16b7 b0 b7 b0011

Pagina 139 - SMOVF SMOVF

205Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMUL(1) MUL.size #IMM, destdest codedsp8dsp16/abs16)#IMM8#IMM16D

Pagina 140 - SSTR SSTR

206Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(MUL(2) MUL.size src, destdsp8dest codedsp16/abs16)src codedsp8

Pagina 141 - STore from Control register

207Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesMULU(1) MULU.size #IMM, dest.size.B.WSIZE01DESTdestdsp:8[A0]dsp

Pagina 142 - STCTX STCTX

208Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(MULU(2) MULU.size src, destdsp8dest codedsp16/abs16)src codeds

Pagina 143 - STore to EXtra far data area

209Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesNEG(1) NEG.size destdest codedsp8)dsp16/abs16destdsp:8[A0]dsp:8

Pagina 144 - STNZ STNZ

210Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(2) NOT.B:S destNOTdest codedsp8)abs16NOT(1) NOT.size:G destdes

Pagina 145 - Conditional transfer

211Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesOR(1) OR.size:G #IMM, destdest codedsp8)dsp16/abs16#IMM8#IMM16d

Pagina 146 - STZX STZX

5Chapter 1 Overview1.3.2 Address registers (A0 and A1)The address registers (A0 and A1) consist of 16 bits, and have the similar functions as the dat

Pagina 147 - Subtract without borrow

212Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(OR(3) OR.size:G src, destdsp8dest codedsp16/abs16)src codedsp8

Pagina 148

213Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesOR(4) OR.B:S src, R0L/R0Hdest codedsp8)abs16POP(1) POP.size:G d

Pagina 149

214Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(2) POP.B:S dest1/3POP(3) POP.W:S dest1/3[ Number of Bytes/Numb

Pagina 150 - UNDefined instruction

215Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesPOPC(1) POPC destPOPM(1) POPM destDESTdest DEST000001010011---I

Pagina 151 - WAIT WAIT

216Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesPUSH(1) PUSH.size:G #IMM#IMM8#IMM16.size.B.WSIZE013/2(2) PUSH.s

Pagina 152 - XCHG XCHG

217Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesPUSH(3) PUSH.B:S src1/2[ Number of Bytes/Number of Cycles ]PUSH

Pagina 153 - Exclusive OR

218Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesPUSHA(1 ) PUSHA srcdsp8src codedsp16/abs16)[ Number of Bytes/Nu

Pagina 154

219Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesPUSHM[ Number of Bytes/Number of Cycles ](1) PUSHM srcSRC2/2

Pagina 155 - Chapter 4

220Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles*1 m denotes the number of operation performed.*2 If the size s

Pagina 156 - 4.1 Guide to This Chapter

221Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesRORC(1) RORC.size destdest codedsp8)dsp16/abs16destdsp:8[A0]dsp

Pagina 157 - (4) Table of cycles

6Chapter 1 Overview1.4 Flag Register (FLG)Figure 1.4.1 shows a configuration of the flag register (FLG). The function of each flag is detailed below

Pagina 158 - (1) ADC.size #IMM, dest

222Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesROT(1) ROT.size #IMM, destdest codedsp8)dsp16/abs16100010011010

Pagina 159 - (2) ADC.size src, dest

223Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesROT(2) ROT.size R1H, destdest codedsp8)dsp16/abs16DESTdestdsp:8

Pagina 160 - (1) ADD.size:G #IMM, dest

224Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSBB(1) SBB.size #IMM, destdest codedsp8)dsp16/abs16#IMM8#IMM16d

Pagina 161 - (2) ADD.size:Q #IMM, dest

225Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(SBB(2) SBB.size src, destdsp8dest codedsp16/abs16)src codedsp8

Pagina 162 - (3) ADD.B:S #IMM8, dest

226Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSBJNZ(1) SBJNZ.size #IMM, dest, label1111100SIZEIMM4 DESTlabel

Pagina 163 - (4) ADD.size:G src, dest

227Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSHA(1) SHA.size #IMM, dest1111000SIZEIMM4 DESTdest codedsp8)dsp

Pagina 164 - (5) ADD.B:S src, R0L/R0H

228Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSHA0111010SIZE1 1 1 1 DEST(2) SHA.size R1H, destdest codedsp8)d

Pagina 165 - (7) ADD.size:Q #IMM, SP

229Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSHA(4) SHA.L R1H, dest2/4+m[ Number of Bytes/Number of Cycles ]

Pagina 166

230Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSHL(1) SHL.size #IMM, destdest codedsp8)dsp16/abs16100010011010

Pagina 167 - (2) AND.B:S #IMM8, dest

231Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSHL(2) SHL.size R1H, destdest codedsp8)dsp16/abs16DESTdestdsp:8

Pagina 168 - (3) AND.size:G src, dest

7Chapter 1 Overview1.4 Flag Register (FLG)Figure 1.4.1 Configuration of flag register (FLG)IPL U I O B S Z D Cb15 b0Carry flagDebug flagZero flagSig

Pagina 169 - (4) AND.B:S src, R0L/R0H

232Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSHL(4) SHL.L R1H, dest2/4+m[ Number of Bytes/Number of Cycles ]

Pagina 170 - (1) BCLR:G dest

233Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles0111110SIZE11101000SMOVF.size.B.WSIZE012/5+5 m[ Number of By

Pagina 171 - (2) BCLR:S bit, base:11[SB]

234Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSTC0 1 1 1 1 0 1 1 1 SRC DEST(1) STC src, destdest Codedsp8)dsp

Pagina 172

235Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSTCTXabs16[ Number of Bytes/Number of Cycles ]7/11+2 mSTE(1)

Pagina 173 - (1) BNAND src

236Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(2) STE.size src, dsp:20[A0]STEdsp8src codedsp16/abs16)srcdsp:8

Pagina 174 - (1) BNOT:G dest

237Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSTNZ(1) STNZ #IMM8, destdsp:8[SB/FB]3/2Rn2/1abs164/2destBytes/C

Pagina 175 - (1) BNTST src

238Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSTZX(1) STZX #IMM81, #IMM82, dest1 1 0 1 1 DEST[ Number of Byte

Pagina 176 - (1) BOR src

239Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSUB(2) SUB.B:S #IMM8, destdsp:8[SB/FB]3/3Rn2/1abs164/3destRndsp

Pagina 177 - (1) BSET:G dest

240Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(SUB(3) SUB.size:G src, destdsp8dest codedsp16/abs16)src codeds

Pagina 178 - (1) BTST:G src

241Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesSUB(4) SUB.B:S src, R0L/R0Hdest codedsp8)abs16dsp:8[SB/FB]2/3Rn

Pagina 179 - (1) BTSTC dest

8Chapter 1 Overview1.5 Register BankR0 H Lb15 b8b7 b0R3A0A1FBR1 H LR2R0 H Lb15 b8b7 b0R3A0A1FBR1 H LR2Register bank 0 (B flag = 0) Register bank 1 (

Pagina 180 - (1) BXOR src

242Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesTST(2) TST.size src, destdsp8dest codedsp16/abs16)src codedsp8)

Pagina 181 - (1) CMP.size:G #IMM, dest

243Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of Cycles(1) UNDUND[ Number of Bytes/Number of Cycles ]1/20Bytes/Cycles(

Pagina 182 - (2) CMP.size:Q #IMM, dest

244Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesXCHG(1) XCHG.size src, destdest codedsp8)dsp16/abs16.size.B.WSI

Pagina 183 - (3) CMP.B:S #IMM8, dest

245Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesXOR(1) XOR.size #IMM, destdest codedsp8)dsp16/abs16#IMM8#IMM16d

Pagina 184 - (4) CMP.size:G src, dest

246Chapter 4 Instruction Code/Number of Cycles4.2 Instruction Code/Number of CyclesXOR(2) XOR.size src, dest1000100SIZESRC DESTdsp8dest codedsp16/

Pagina 185 - (1) DADC.B #IMM8, R0L

Chapter 5Interrupt5.1 Outline of Interrupt5.2 Interrupt Control5.3 Interrupt Sequence5.4 Return from Interrupt Routine5.5 Interrupt Priority5.6

Pagina 186 - (3) DADC.B R0H, R0L

248Chapter 5 InterruptUndefined instruction (UND instruc-tion)Overflow (INTO instruction)BRK instructionINT instructionRemarksInterrupt generated by

Pagina 187 - (1) DADD.B #IMM8, R0L

249Chapter 5 Interrupt5.1.2 Software InterruptsSoftware interrupts are generated by some instruction that generates an interrupt request when ex-ec

Pagina 188 - (3) DADD.B R0H, R0L

250Chapter 5 Interrupt5.1.3 Hardware InterruptsThere are Two types in hardware Interrupts; special interrupts and Peripherai I/O interrupts.(1) Sp

Pagina 189 - (1) DEC.B dest

251Chapter 5 InterruptFSET ITime5.2 Interrupt ControlThe following explains how to enable/disable maskable interrupts and set acknowledge priority.

Pagina 190 - (1) DIV.size #IMM

9Chapter 1 Overview1.6 Internal State after Reset is Cleared1.6 Internal State after Reset is ClearedThe following lists the content of each registe

Pagina 191 - (1) DIVU.size #IMM

252Chapter 5 InterruptWhen the processor interrupt priority level (IPL) or the interrupt priority level of some interrupt ischanged, the altered lev

Pagina 192 - (1) DIVX.size #IMM

253Chapter 5 Interrupt5.2 Interrupt ControlExample 1:Using the NOP instruction to keep the program waiting until the interrupt control register is

Pagina 193 - (1) DSBB.B #IMM8, R0L

254Chapter 5 Interrupt5.3 Interrupt SequenceAn interrupt sequence — what are performed over a period from the instant an interrupt is accepted to t

Pagina 194 - (3) DSBB.B R0H, R0L

255Chapter 5 Interrupt5.3.1 Interrupt Response TimeThe interrupt response time means a period of time from when an interrupt request is generated t

Pagina 195 - (1) DSUB.B #IMM8, R0L

256Chapter 5 InterruptValue that is set to IPL70Not changed5.3.2 Changes of IPL When Interrupt Request AcknowledgedWhen an interrupt request is ack

Pagina 196 - (3) DSUB.B R0H, R0L

257Chapter 5 InterruptThe register save operation performed in an interrupt sequence differs depending on whether the con-tent of the stack pointer

Pagina 197 - (1) ENTER #IMM8

258Chapter 5 Interrupt5.4 Return from Interrupt RoutineAs you execute the REIT instruction at the end of the interrupt routine, the contents of the

Pagina 198 - (1) EXTS.B dest

259Chapter 5 Interrupt5.5 Interrupt PriorityIf two or more interrupt requests are sampled active at the same time, whichever interrupt request is a

Pagina 199 - (1) FCLR dest

260Chapter 5 Interrupt5.6 Multiple InterruptsThe following shows the internal bit states when control has branched to an interrupt routine:• The i

Pagina 200 - (1) INC.B dest

261Chapter 5 InterruptI = 0IPL = 0I = 1I = 0IPL = 3I = 1I = 0IPL = 5REITI = 1IPL = 3REITI = 1IPL = 0I = 0IPL = 2REITI = 1IPL = 0Interrupt priority l

Pagina 201 - (1) INT #IMM

10Chapter 1 Overview1.7 Data Typesb7 b0b7 b0 Sb15 b0 SSigned byte (8 bit) integerUnsigned byte (8 bit) integerSigned word (16 bit) integerUnsigned wo

Pagina 202 - (1) INTO

262Chapter 5 Interrupt5.7 Precautions for Interrupts5.7.1 Reading address 0000016Do not read the address 0000016 in a program. When a maskable inter

Pagina 203 - (1) JMP.S label

263Chapter 5 InterruptExample 1:Using the NOP instruction to keep the program waiting until the interrupt control register is modifiedINT_SWITCH1:FC

Pagina 204 - (3) JMP.W label

264Chapter 5 Interrupt

Pagina 205 - (4) JMP.A label

Chapter 6Calculation Number of Cycles6.1 Instruction queue buffer

Pagina 206 - (1) JMPS #IMM8

62666.1 Instruction queue bufferCalculation number of cycles6.1 Instruction queue bufferThe M16C/60, M16C/20, M16C/Tiny series have 4-stage (4-byte) i

Pagina 207 - (2) JSR.A label

6267Calculation number of cycles6.1 Instruction queue bufferSample programAddress Code InstructionFC050 64 JMP TEST_11FC051 04 NOP FC052 04 NOPFC053 0

Pagina 208 - (2) JSRI.A src

62686.1 Instruction queue bufferCalculation number of cyclesSample programAddress Code InstructionFC058 64 JMP TEST_11FC059 04 NOPFC05A 04 NOP FC05B

Pagina 209 - (1) LDC #IMM16, dest

6269Calculation number of cycles6.1 Instruction queue bufferSample programAddress Code InstructionFC06C 64 JMP TEST_11FC06D 04 NOPFC06E 04 NOP FC06F

Pagina 210 - (1) LDCTX abs16, abs20

62706.1 Instruction queue bufferCalculation number of cyclesSample programAddress Code InstructionFC058 64 JMP TEST_11FC059 04 NOPFC05A 04 NOP FC05B

Pagina 211 - (2) LDE.size dsp:20[A0], dest

Q&A-1 Q & AInformation in a Q&A form to be used to make the most of the M16C family is given below.Usually, one question and the answer to

Pagina 212 - (1) LDINTB #IMM

11Chapter 1 Overview1.7 Data Types1.7.2 DecimalThis type of data can be used in DADC, DADD, DSBB, and DSUB.Pack format(2 digits)Pack format(4 digits

Pagina 213 - (1) MOV.size:G #IMM, dest

Q&A-2CPUQASB and FB function in the same manner, so you can use them as intended in programming in theassembly language. If you write a program in

Pagina 214 - (2) MOV.size:Q #IMM, dest

Q&A-3InterruptQAYes. But there can be a chance that the microcomputer runs away out of control if an interruptrequest occurs in changing the value

Pagina 215 - (3) MOV.B:S #IMM8, dest

Q&A-4CPUQAWhat is the difference between the user stack pointer (USP) and the interrupt stack pointer (ISP)?,What are their roles?You use USP when

Pagina 216 - (5) MOV.B:Z #0, dest

Q&A-5CPUQAHow does the instruction code become if I use a bit instruction in absolute addressing ?An explanation is given here by taking BSET bit,

Pagina 217 - (6) MOV.size:G src, dest

Q&A-6CPUQAWhat is the difference between the DIV instruction and the DIVX instruction?Either of the DIV instruction and the DIVX instruction is an

Pagina 218 - (8) MOV.B:S R0L/R0H, dest

Glossary-1GlossaryTechnical terms used in this software manual are explained below. They are good in this manual only.

Pagina 219 - (9) MOV.B:S src, R0L/R0H

Glossary-2borrow Tomove a digit to the next lower position. carrycarry Tomove a digit to the next higher position. borrowcontext Registers that a pro

Pagina 220 - (1) MOVA src, dest

Glossary-3Term Meaning Related wordmacro instructionMSBoperandoperationoperation codeoverflowpackSFR areaAn instruction, written in a source language,

Pagina 221 - R0L, dest

Glossary-4Term Meaning Related wordshift outsign bitsign extensionstack framestringunpackzero extensionTo move the content of a register either to the

Pagina 222

Symbol-1Table of symbolsSymbols used in this software manual are explained below. They are good in this manual only.

Pagina 223 - (1) MUL.size #IMM, dest

M16C/60, M16C/20, M16C/Tiny SeriesSoftware Manual16Rev. 4.00 2004.01RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTERAll information contained in these mater

Pagina 224 - (2) MUL.size src, dest

12Chapter 1 Overview1.7 Data Types1.7.3 Bits● Register bitsFigure 1.7.3 shows register bit specification.Register bits can be specified by register

Pagina 225 - (1) MULU.size #IMM, dest

Symbol-2Symbol MeaningTransposition from the right side to the left sideInterchange between the right side and the left sideAdditionSubtractionMultipl

Pagina 226 - (2) MULU.size src, dest

Index-1IndexAA0 and A1 ••• 5A1A0 ••• 5Address register ••• 5Address space ••• 3Addressing mode ••• 22BB flag ••• 6Byte (8-bit) data ••• 16CC flag •••

Pagina 227 - (1) NEG.size dest

Index-2Operation ••• 37Overflow flag ••• 6PPC ••• 5Processor interrupt priority level ••• 7Program counter ••• 5RR0, R1, R2, and R3 ••• 4R0H, R1H •••

Pagina 228 - (1) NOT.size:G dest

REVISION HISTORYRev. Date DescriptionPage SummaryM16C/60, M16C/20, M16C/Tiny Series Software ManualB Sep 09, 1999Page 104 [Operation] Line 3Add to “ *

Pagina 229 - (2) OR.B:S #IMM8, dest

REVISION HISTORYRev. Date DescriptionPage SummaryM16C/60, M16C/20, M16C/Tiny Series Software ManualB3 Jul 09, 2002 –Page 127 [ Function ]• This instr

Pagina 230 - (3) OR.size:G src, dest

REVISION HISTORYRev. Date DescriptionPage SummaryM16C/60, M16C/20, M16C/Tiny Series Software ManualB3 Jul 09, 2002 –Page 132 [ Function ] perform op

Pagina 231 - (1) POP.size:G dest

REVISION HISTORYRev. Date DescriptionPage SummaryM16C/60, M16C/20, M16C/Tiny Series Software Manual4.00 Jan 21, 2004 253, 262Add TECHNICAL NEWS NO M16

Pagina 232 - (3) POP.W:S dest

RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTERSOFTWARE MANUALM16C/60, M16C/20, M16C/Tiny SeriesPublication Data : Rev.B3 Jul 15, 2002Rev.4.00 Jan 21, 2004Pu

Pagina 233 - (1) POPM dest

1753, Shimonumabe, Nakahara-ku, Kawasaki-shi, Kanagawa 211-8668 JapanM16C/60, M16C/20, M16C/Tiny SeriesREJ09B0137-0400ZSoftware Manual

Pagina 234 - (2) PUSH.size:G src

13Chapter 1 Overview0n-1nn+1nÅ{1 n nÅ|1 0b7 b0b7 b0b7 b0 b7 b0b7 b0BSET 2,AH ;b7 b2 b0b15 b10 b8b7 b0b87 b82 b80b79 b72 b7 b0b23 b18 b16b15 b8b7 b0BSE

Pagina 235 - (4) PUSH.W:S src

14Chapter 1 Overview1.7 Data Types(2) SB/FB relative bit specificationFor SB/FB-based relative addressing, use bit 0 of the address that is the sum

Pagina 236 - (1) PUSHC src

15Chapter 1 Overview1.7 Data Types1.7.4 StringString is a type of data that consists of a given length of consecutive byte (8-bit) or word (16-bit)

Pagina 237 - (1) REIT

16Chapter 1 Overview1.8 Data Arrangement1.8 Data Arrangement1.8.1 Data Arrangement in RegisterFigure 1.8.1 shows the relationship between a registe

Pagina 238 - (1) ROLC.size dest

17Chapter 1 Overviewb7 b0N DATA(L)N+1 DATA(H)N+2N+3b7 b0N DATAN+1N+2N+3MOV.B N,R0HMOV.W N,R0R0HLb15 b0R0HLb15 b0DATADATA(H) DATA(L)Word (16-bit) dataB

Pagina 239 - (1) RORC.size dest

18Chapter 1 Overview1.9 Instruction Format1.9 Instruction FormatThe instruction format can be classified into four types: generic, quick, short, and

Pagina 240 - (1) ROT.size #IMM, dest

19Chapter 1 Overview255254181.10 Vector Table1.10 Vector TableThe vector table comes in two types: a special page vector table and an interrupt vect

Pagina 241 - (2) ROT.size R1H, dest

20Chapter 1 Overview1.10 Vector Table1.10.2 Variable Vector TableThe variable vector table is an address-variable vector table. Specifically, this

Pagina 242 - (1) SBB.size #IMM, dest

Chapter 2Addressing Modes2.1 Addressing Modes2.2 Guide to This Chapter2.3 General Instruction Addressing2.4 Special Instruction Addressing2.5 Bit

Pagina 243 - (2) SBB.size src, dest

Keep safety first in your circuit designs!Notes regarding these materials1.Renesas Technology Corporation puts the maximum effort into making semicond

Pagina 244

22Chapter 2 Addressing Modes2.1 Addressing ModesThis section describes addressing mode-representing symbols and operations for each addressing mode.

Pagina 245 - (1) SHA.size #IMM, dest

23Chapter 2 Addressing Modes2.2 Guide to This ChapterThe following shows how to read this chapter using an actual example.Address register relatived

Pagina 246 - (3) SHA.L #IMM, dest

24Chapter 2 Addressing Modes#IMM#IMM8#IMM16#IMM20ImmediateThe immediate data indicated by #IMMis the object to be operated on.Register directR0LR0HR1

Pagina 247 - (4) SHA.L R1H, dest

25Chapter 2 Addressing ModesaddressaddressAddress register relativedsp:8[A0]dsp:8[A1]dsp:16[A0]dsp:16[A1]dsp:8[SB]dsp:16[SB]SB relativeFB relativedsp

Pagina 248 - (1) SHL.size #IMM, dest

26Chapter 2 Addressing Modesdsp:8[SP]Stack pointer relativedspdspSPRegisterMemoryIf the dsp value is negativeIf the dsp value is positiveaddress2.3

Pagina 249 - (3) SHL.L #IMM, dest

27Chapter 2 Addressing Modes20-bit absoluteabs20abs20dsp:20[A0]dsp:20[A1]Address register relative with20-bit displacementaddressA0LDE, STE instructi

Pagina 250 - (1) SMOVB.size

28Chapter 2 Addressing Modes 32-bit register directR2R0R3R1A1A0 SHL, SHA instructionsJMPI, JSRI instructionsR2R0R3R1A1A0b0b31b15b16R2R0R3R1b0b31b15b1

Pagina 251 - (1) SSTR.size

29Chapter 2 Addressing Modes +0 dsp +7Memorylabel Program counter relativelabel Base address dspdspdsplabellabelMemory Base addressIf the dsp va

Pagina 252 - (2) STC PC, dest

30Chapter 2 Addressing ModesThe specified register bit is the objectto be operated on.For the bit position (bit) you canspecify 0 to 15.Register dire

Pagina 253 - (1) STCTX abs16, abs20

31Chapter 2 Addressing Modesbaseaddress Address register relativebase:8[A0]base:8[A1]base:16[A0]base:16[A1]SB relativebit,base:8[SB]bit,base:11[SB]bi

Pagina 254 - (3) STE.size src, [A1A0]

A table of symbols, a glossary, and an index are appended at the end of this manual.Using This ManualThis manual is written for the M16C/60, M16C/20,

Pagina 255 - (1) STZ #IMM8, dest

32Chapter 2 Addressing Modesaddress FB relativebit,base:8[FB]FBaddressRegisterbasebaseIf the base value is negative If the base value is positive Mem

Pagina 256 - (1) SUB.size:G #IMM, dest

Chapter 3Functions3.1 Guide to This Chapter3.2 Functions

Pagina 257 - (2) SUB.B:S #IMM8, dest

343.1 Guide to This ChapterChapter 3 Functions[ Operation ]dest src92MOVeMOV[ Function ][ Reated Instruction]LDE,STE,XCHG[ Description Exam

Pagina 258 - (3) SUB.size:G src, dest

353.1 Guide to This ChapterChapter 3 Functions(1) MnemonicIndicates the mnemonic explained in this page.(2) Instruction code/Number of CyclesIndic

Pagina 259 - (1) TST.size #IMM, dest

363.1 Guide to This ChapterChapter 3 Functions9292MOVeMOVsrc destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0 A1/A1 [A0] [A1] A0/A0

Pagina 260 - (2) TST.size src, dest

373.1 Guide to This ChapterChapter 3 Functions(4) OperationExplains the operation of the instruction using symbols.(5) FunctionExplains the functi

Pagina 261 - (1) WAIT

383.1 Guide to This ChapterChapter 3 FunctionsThe following explains the syntax of each jump instruction—JMP, JPMI, JSR, and JSRI by using an actual

Pagina 262 - (1) XCHG.size src, dest

393.2 FunctionsChapter 3 FunctionsAbsolute valueABSolute[ Syntax ]ABS.size destABS.B R0LABS.W A0[ Selectable dest ]ABS[ Function ]• This instructi

Pagina 263 - (1) XOR.size #IMM, dest

403.2 FunctionsChapter 3 Functions[ Instruction Code/Number of Cycles ]Page=Add with carryADdition with Carry[ Related Instructions ] ADCF,ADD,SBB

Pagina 264 - (2) XOR.size src, dest

413.2 FunctionsChapter 3 FunctionsAdd carry flagADdition Carry Flag[ Selectable dest ]destR0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0 A1/A1 [A0] [A1]dsp:8[A0

Pagina 265 - Interrupt

M16C Family Documents The following documents were prepared for the M16C family. (1) Document ContentsShort Sheet Hardware overviewData

Pagina 266

423.2 FunctionsChapter 3 FunctionsAdd without carryADDition[ Related Instructions ] ADC,ADCF,SBB,SUBADD ADD[ Syntax ]ADD.size (:format) src,dest[

Pagina 267 - 5.1.2 Software Interrupts

433.2 FunctionsChapter 3 Functions[src/dest Classified by Format]src destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0 A1/A1 [A0] [

Pagina 268 - ____________

443.2 FunctionsChapter 3 FunctionsUIOBSZDCAdd & conditional jumpADdition then Jump on Not ZeroADJNZ.W #–1,R0,label[ Related Instructions ] SBJ

Pagina 269 - 5.2 Interrupt Control

453.2 FunctionsChapter 3 FunctionsANDLogically AND[ Related Instructions ] OR,XOR,TST[ Function ]AND AND[ Syntax ]AND.size (:format) src,dest[ Sel

Pagina 270

463.2 FunctionsChapter 3 Functions[src/dest Classified by Format]G formatsrc destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0*1A1/

Pagina 271

473.2 FunctionsChapter 3 Functions• This instruction logically ANDs the C flag and src together and stores the result in the C flag.Bit AND carry

Pagina 272 - 5.3 Interrupt Sequence

483.2 FunctionsChapter 3 FunctionsBit CLeaRClear bit[ Syntax ]BCLR (:format) dest[ Related Instructions ] BSET,BNOT,BNTST,BTST,BTSTC,BTSTS[ Funct

Pagina 273

493.2 FunctionsChapter 3 FunctionsCndConditionExpressionCndConditionExpressionGEU/C C=1 Equal to or greater than LTU/NC C=0 Smaller thanC flag is

Pagina 274 - 5.3.3 Saving Registers

503.2 FunctionsChapter 3 FunctionsBit Not AND carry flagLogically AND inverted bits[ Related Instructions ] BAND,BOR,BXOR,BNOR,BNXOR[ Function ]BN

Pagina 275

51Chapter 3 Functions3.2 Functions[ Instruction Code/Number of Cycles ]Page=Bit Not OR carry flagLogically OR inverted bits[ Syntax ]BNOR src[ Desc

Pagina 276

A-1Table of ContentsChapter 1 Overview ___________________________________________________1.1 Features of M16C/60, M16C/20, M16C/Tiny series

Pagina 277 - 5.5 Interrupt Priority

52Chapter 3 Functions3.2 FunctionsUIOBSZDCBit NOTInvert bit [ Syntax ]BNOT(:format) dest[ Flag Change ][ Description Example ]BNOT flagBNOT 4,Ram:

Pagina 278 - 5.6 Multiple Interrupts

53Chapter 3 Functions3.2 FunctionsBit Not TeSTTest inverted bit[ Flag Change ][ Description Example ][ Function ][ Selectable src ]BNTST BNTST[ Syn

Pagina 279

54Chapter 3 Functions3.2 FunctionsBit Not eXclusive OR carry flagExclusive OR inverted bits[ Flag Change ][ Description Example ][ Related Instruct

Pagina 280 - 5.7.2 Setting the SP

55Chapter 3 Functions3.2 FunctionsBit OR carry flagLogically OR bits[ Syntax ]BOR src[ Description Example ][ Related Instructions ] BAND,BXOR,BNAN

Pagina 281

56Chapter 3 Functions3.2 FunctionsBReaKDebug interruptBRK[ Description Example ][ Related Instructions ] INT,INTO[ Function ]BRK BRK[ Flag Change ]

Pagina 282

57Chapter 3 Functions3.2 FunctionsBit SETSet bit [ Flag Change ][ Related Instructions ] BCLR,BNOT,BNTST,BTST,BTSTC,BTSTS[ Function ][ Selectable

Pagina 283 - Calculation Number of Cycles

58Chapter 3 Functions3.2 FunctionsBit TeSTTest bit[ Flag Change ][ Function ][ Related Instructions ] BCLR,BSET,BNOT,BNTST,BTSTC,BTSTS[ Selectable

Pagina 284

59Chapter 3 Functions3.2 FunctionsBit TeST & ClearTest bit & clear[ Flag Change ][ Description Example ][ Related Instructions ] BCLR,BSET,

Pagina 285 - Calculation number of cycles

60Chapter 3 Functions3.2 FunctionsBit TeST & SetTest bit & set[ Flag Change ][ Description Example ][ Related Instructions ] BCLR,BSET,BNOT

Pagina 286

613.2 FunctionsChapter 3 FunctionsBit eXclusive OR carry flagExclusive OR bits[ Flag Change ][ Description Example ][ Related Instructions ] BAND,B

Pagina 287

A-2Chapter 2 Addressing Modes ___________________________________________2.1 Addressing Modes ...

Pagina 288

623.2 FunctionsChapter 3 Functions[ Instruction Code/Number of Cycles ]Page= Compare[ Syntax ]CMP.size (:format) src,dest[ Description Example ][ S

Pagina 289 - Q & A

633.2 FunctionsChapter 3 Functions[src/dest Classified by Format]S format*3src destR0L/R0 R0H/R1 R1L/R2 R1H/R3 R0L/R0 R0H/R1 R1L/R2 R1H/R3A0/A0 A1/

Pagina 290 - Q&A-2

643.2 FunctionsChapter 3 FunctionsDecimal ADdition with CarryDecimal add with carry[ Syntax ]DADC.size src,dest[ Flag Change ][ Description Example

Pagina 291 - Q&A-3

653.2 FunctionsChapter 3 FunctionsDecimal ADDitionDecimal add without carry[ Flag Change ][ Description Example ]DADD.B #3,R0LDADD.W R1,R0[ Related

Pagina 292 - Q&A-4

663.2 FunctionsChapter 3 FunctionsUIOBSZDCDECrementDecrement[ Syntax ]DEC.size dest[ Flag Change ][ Related Instructions ] INC[ Function ]DEC DEC[

Pagina 293 - Q&A-5

673.2 FunctionsChapter 3 FunctionsSigned divideDIVideDIV.B A0 ;A0’s 8 low-order bits is the divisor.DIV.B #4DIV.W R0[ Related Instructions ] DIVU,D

Pagina 294 - Q&A-6

683.2 FunctionsChapter 3 FunctionsDIVide UnsignedUnsigned divide[ Description Example ][ Related Instructions ] DIV,DIVX,MUL,MULUDIVU DIVU[ Syntax

Pagina 295 - Glossary

693.2 FunctionsChapter 3 FunctionsDIVide eXtensionSinged divide[ Syntax ]DIVX.size src[ Description Example ][ Related Instructions ] DIV,DIVU,MUL,

Pagina 296 - Glossary-2

703.2 FunctionsChapter 3 FunctionsDecimal SuBtract with BorrowDecimal subtract with borrow[ Syntax ]DSBB.size src,dest[ Flag Change ][ Description

Pagina 297 - Glossary-3

713.2 FunctionsChapter 3 FunctionsDecimal SUBtractDecimal subtract without borrow [ Syntax ]DSUB.size src,dest [ Flag Change ] [ Description Exa

Pagina 298 - Glossary-4

Quick Reference-1DIVUDIVXDSBBDSUBENTEREXITDEXTSFCLRFSETINCINTINTOJCnd JEQ/Z JGE JGEU/C JGT JGTU JLE JLEU JLT JLTU/NC JN

Pagina 299 - Table of symbols

72Chapter 3 Functions3.2 Functions179ENTER functionBuild stack frame[ Description Example ]ENTER #3[ Related Instructions ] EXITDENTER ENTER[ Flag

Pagina 300 - Symbol-2

73Chapter 3 Functions3.2 FunctionsArgument of function[ Instruction Code/Number of Cycles ]Page=180EXIT and Deallocate stack frame[ Description Exa

Pagina 301

74Chapter 3 Functions3.2 FunctionsEXTend SignExtend sign[ Description Example ][ Function ][ Flag Change ]EXTS EXTS[ Syntax ]EXTS.size dest• This i

Pagina 302

75Chapter 3 Functions3.2 FunctionsFlag register CLeaRClear flag register bit[ Flag Change ][ Description Example ][ Related Instructions ] FSET[ Fu

Pagina 303 - REVISION HISTORY

76Chapter 3 Functions3.2 FunctionsFlag register SETSet flag register bit[ Description Example ][ Related Instructions ] FCLR[ Function ][ Selectabl

Pagina 304

77Chapter 3 Functions3.2 FunctionsINCrementIncrement[ Description Example ]INC.W A0INC.B R0L[ Related Instructions ] DEC[ Function ][ Selectable de

Pagina 305

78Chapter 3 Functions3.2 FunctionsInterrupt by INT instructionINTerrupt[ Related Instructions ] BRK,INTO[ Flag Change ]INT INT[ Syntax ]INT src[ De

Pagina 306

79Chapter 3 Functions3.2 FunctionsINTerrupt on OverflowInterrupt on overflow[ Syntax ]INTO[ Related Instructions ] BRK,INT[ Flag Change ]INTO INTO[

Pagina 307

80Chapter 3 Functions3.2 FunctionsCndConditionExpressionCndConditionExpressionGEU/C C=1 Equal to or greater than LTU/NC C=0 Smaller thanC flag is 1

Pagina 308 - Software Manual

81Chapter 3 Functions3.2 FunctionsJuMPUnconditional jump[ Syntax ]JMP(.length) label[ Description Example ][ Related Instructions ] JMPI,JMPSJMP JM

Comentarios a estos manuales

Sin comentarios