您好,欢迎访问三七文档
HCS12TechnicalTrainingModule3-InstructionSet,Slide1MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.HCS12InstructionsetHCS12TechnicalTrainingModule3-InstructionSet,Slide2MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.INSTRUCTIONSETDataHandlingArithmeticLogicDataTestBranchJump&SubroutineCallsHCS12TechnicalTrainingModule3-InstructionSet,Slide3MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONS(DATAMOVEMENT)(M)R(M+1)RFUNCTIONMNEMONICOPERATIONLOADACMLTRLDAALDAB(M)BLOAD16BITREGLOADEALEAXeaXLEAYeaYLEASeaSPLDDLDXLDYLDSHL(M)AEXAMPLE:LEAXB,YYBXREG2025+ACCB25Y2000MEMHCS12TechnicalTrainingModule3-InstructionSet,Slide4MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONS(DATAMOVEMENT)R(M)R(M+1)FUNCTIONMNEMONICOPERATIONSTOREACMLTRSTAASTABA(M)B(M)STORE16BITREGSTDSTXSTYSTSHLPUSHDATATOSTACKPSHAPSHBPSHCPSHDPSHXPSHYPULLDATAFROMSTACKPULBPULCPULDPULXPULYPULAMOVEMOVMEMMEMEXAMPLE:MOVW2,X+,2,-Y(SP)(SP)-1SP(REG)M(M)REG(SP)(SP)-2SP(R:R)(M):(M)(SP)(SP+1)HL(SP)+1SP(M):(M)R:R(SP)+2SPLH(SP)(SP)+1HCS12TechnicalTrainingModule3-InstructionSet,Slide5MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.STACKOPERATIONMEMTOPOFSTACKEXAMPLE:PSHXBEFOREMEMXHXLTOPOFSTACKPSHXAFTERINCREASINGADDRESSESINCREASINGADDRESSESSP$3FFESP$4000SP$3FFFSP$4000B7B0B7B0HCS12TechnicalTrainingModule3-InstructionSet,Slide6MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONS(TRANSFERANDEXCHANGE)FUNCTIONMNEMONICOPERATIONTRANSFERDATATRANSFERREGTOREGTFRA,B,CCR,D,X,Y,SPA,B,CCR,D,X,Y,SPEXCHANGEEXGA,B,CCR,D,X,Y,SPA,B,CCR,D,X,Y,SPTBATABTXSTYSTSXTSYXGDXXGDYEXCHANGEDATABAABRSPSPRDXDYEXAMPLE1:TFRX,AEXAMPLE2:EXGY,BHCS12TechnicalTrainingModule3-InstructionSet,Slide7MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONS(ALTERDATA)FUNCTIONMNEMONICOPERATIONDECREMENTDECDECADECBDEXDEYDES(M)-1(M)A-1AB-1BX-1XY-1YS-1SINCREMENTINCINCAINCBINXINYINS(M)+1(M)A+1AB+1BX+1XY+1YS+1SHCS12TechnicalTrainingModule3-InstructionSet,Slide8MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONS(ALTERDATA)FUNCTIONMNEMONICOPERATIONCOMPLEMENT,2'S(NEGATE)NEGNEGANEGBCOMCOMACOMBCOMPLEMENT,1'SCLEARCLRCLRACLRB0-(M)(M)0-AA0-BB(M)(M)AABB0(M)0A0BBIT(S)CLEARBCLR(M)MASK(M)BIT(S)SETBSET(M)+MASK(M)•BitManipulationExample:BSETOFFSET,X,#MASKHCS12TechnicalTrainingModule3-InstructionSet,Slide9MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONSMININUMOFTWOUNSIGNED8-BITVALUEFUNCTIONMNEMONICOPERATIONMIN((A),(M))(A)MINAMININUMOFTWOUNSIGNED8-BITVALUEMIN((A),(M))(M)MINMMAXIMUMOFTWOUNSIGNED8-BITVALUEMAX((A),(M))(A)MAXAMAXIMUMOFTWOUNSIGNED8-BITVALUEMAX((A),(M))(M)MAXMLOOPMINA1,X+BHSLOOPHCS12TechnicalTrainingModule3-InstructionSet,Slide10MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONSMININUMOFTWOUNSIGNED16-BITVALUEFUNCTIONMNEMONICOPERATIONMIN((D),(M:M+1))(D)EMINDMININUMOFTWOUNSIGNED16-BITVALUEEMINMMAXIMUMOFTWOUNSIGNED16-BITVALUEMAX((D),(M:M+1))(D)EMAXDMAXIMUMOFTWOUNSIGNED8-BITVALUEEMAXMMIN((D),(M:M+1))M:M+1MAX((D),(M:M+1))M:M+1HCS12TechnicalTrainingModule3-InstructionSet,Slide11MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATAHANDLINGINSTRUCTIONS(SHIFTANDROTATE)FUNCTIONMNEMONICOPERATIONROTATELEFTROLROLAROLBMABROTATERIGHTRORRORARORBMABSHIFTLEFT,ARITHMETIC(LOGICAL)ASL(LSL)ASLA(LSLA)ASLB(LSLB)ASLD(LSLD)MABDSHIFTRIGHT,ARITHMETICASRASRAASRBMABSHIFTRIGHT,LOGICALLSRLSRALSRBLSRDMABDCb7b0Cb7b0Cb7b00Cb15b00ABCb7b000Cb7b0Cb15b0ABHCS12TechnicalTrainingModule3-InstructionSet,Slide12MOTOROLAandtheStylizedMLogoareregisteredintheUSPatent&TrademarkOffice.Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.©Motorola,Inc.2001.DATATESTINSTRUCTIONSR-(M+1)R-(M)-CFUNCTIONMNEMONICTESTBITTESTBITABITBA(M)B(M)COMPARECBACMPACMPBCPDCPXCPYTEST,ZEROORMINUSTSTTSTATSTBA-BA-(M)B-(M)(M)-0A-0B-0LHCOMPARESTACKCPSSP-(M:M+1)HCS12TechnicalTrainingM
本文标题:飞思卡尔后备资料3
链接地址:https://www.777doc.com/doc-3352416 .html