Rev. 2.50 42 June 22, 2017 Rev. 2.50 43 June 22, 2017
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Status Register – STATUS
This8-bitregistercontainsthezeroag(Z),carryag(C),auxiliarycarryag(AC),overowag
(OV),powerdownag(PDF),andwatchdogtime-outag(TO).Thesearithmetic/logicaloperation
andsystemmanagementagsareusedtorecordthestatusandoperationofthemicrocontroller.
WiththeexceptionoftheTOandPDFags,bitsinthestatusregistercanbealteredbyinstructions
likemostotherregisters.AnydatawrittenintothestatusregisterwillnotchangetheTOorPDFag.
Inaddition,operationsrelatedtothestatusregistermaygivedifferentresultsduetothedifferent
instructionoperations.TheTOagcanbeaffectedonlybyasystempower-up,aWDTtime-outor
byexecutingthe"CLRWDT"or"HALT"instruction.ThePDFagisaffectedonlybyexecuting
the"HALT"or"CLRWDT"instructionorduringasystempower-up.
TheZ,OV,ACandCagsgenerallyreectthestatusofthelatestoperations.
• Cissetifanoperationresultsinacarryduringanadditionoperationorifaborrowdoesnottake
placeduringasubtractionoperation;otherwiseCiscleared.Cisalsoaffectedbyarotatethrough
carryinstruction.
• ACissetifanoperationresultsinacarryoutofthelownibblesinaddition,ornoborrowfrom
thehighnibbleintothelownibbleinsubtraction;otherwiseACiscleared.
• Zissetiftheresultofanarithmeticorlogicaloperationiszero;otherwiseZiscleared.
• OVissetifanoperationresultsinacarryintothehighest-orderbitbutnotacarryoutofthe
highest-orderbit,orviceversa;otherwiseOViscleared.
• PDFisclearedbyasystempower-uporexecutingthe“CLRWDT”instruction.PDFissetby
executingthe“HALT”instruction.
• TOisclearedbyasystempower-uporexecutingthe“CLRWDT”or“HALT”instruction.TOis
setbyaWDTtime-out.
Inaddition,onenteringaninterruptsequenceorexecutingasubroutinecall,thestatusregisterwill
notbepushedontothestackautomatically.Ifthecontentsofthestatusregistersareimportantandif
thesubroutinecancorruptthestatusregister,precautionsmustbetakentocorrectlysaveit.