www.pudn.com > bak22.rar > OTHER.ASM, change:2006-05-30,size:2890b


MainOther: 
MainOther0: 
         CALL ClearWatchDog 
         R1=[_ErrType] 
         JE MainOther1 
         PC=DealSysError 
MainOther1: 
         CALL ComRx 
         CMP R1, dRxNoSign 
         JE MainOther2 
         CMP R1, 0 
         JE MainOther2 
         R5=R1 
         CALL EnUart 
         R1=0x0d 
         CALL TxByte 
         R1='*' 
         CALL TxByte 
         R1=R5 
         CALL TxHex 
         CALL DiUart 
 
MainOther2: 
         R1=[_SysFlagA] 
         TEST R1, KeyBit 
         JE MainOther3 
         PC=UnitOff 
MainOther3: 
         TEST R1, CoordBit 
         JNE MainOtherCoord 
         PC=MainOther4 
MainOtherCoord: 
         R1&=CoordBit_ 
         [_SysFlagA]=R1 
         R1=[_CardMode] 
         CMP R1, TestMode 
         JE MainTest 
         CMP R1, VersionMode 
         JE MainVersion 
         PC=MainOther4 
 
MainTest: 
         R1=[_SysFlagA] 
         TEST R1, BaseDataBit 
         JE MainTestDetail 
MainTestBase: 
         TEST R1, HadDealBit 
         JNE MainTestEnd 
         R4=0x42 
         CALL TestCheckSum 
         CMP R2, [R3] 
         JNE MainTestEnd 
MainTestBaseOk: 
         CALL PrintBaseData 
         R1=[_SysFlagA] 
         R1|=HadDealBit 
         [_SysFlagA]=R1 
         JMP MainTestEnd 
MainTestDetail: 
         CALL PrintDetail 
MainTestEnd: 
         PC=MainOther0 
 
MainVersion: 
         R1=[_SysFlagA] 
         TEST R1, HadDealBit 
         JNE MainOther4 
         R4=0x10 
         CALL PrintByteBuf 
         R4=0x0f 
         CALL TestCheckSum 
         CMP R2, [R3] 
         JNE MainOther4 
MainVersionMove: 
         R4=16 
         R2=_CommBuf 
         R3=_CommBuf+0x10 
MainVersionMove0: 
         R1=[R2] 
         [R3]=R1 
         R2+=1 
         R3+=1 
         R4-=1 
         JNE MainVersionMove0 
         R4=0x10 
         CALL PrintByteBuf 
         R1=[_SysFlagA] 
         R1|=HadDealBit 
         [_SysFlagA]=R1 
         R1=0 
         [_VerNum]=R1 
         R1=[_CommBuf] 
         [_VerLen]=R1        
MainOther4: 
         R1=[_SacmStatus] 
         JE MainOther5 
         CALL _ServiceLoop 
         PC=MainOther0 
MainOther5: 
         R1=[_CardMode] 
         CMP R1, VersionMode 
         JE MainVersionPlay 
         CMP R1, ContinousMode 
         JNE MainOtherEnd 
MainContinousPlay: 
         R1=[_Index] 
         R1+=1 
         [_Index]=R1 
         CMP R1, [_SoundEndIndex] 
         JNE MainContinousPlay_ 
         PC=UnitOff 
MainContinousPlay_: 
         CALL _PlaySound 
         JMP MainOtherEnd 
 
MainVersionPlay: 
         R1=[_SysFlagA] 
         TEST R1, HadDealBit 
         JE MainOtherEnd 
         CALL PlayVerSound 
MainOtherEnd: 
         PC=MainOther0 
 
 
MainContinous: 
 
TestCheckSum: 
         R2=0 
         R3=_CommBuf 
TestCheckSum0: 
         R2+=[R3++] 
         R4-=1 
         JNE TestCheckSum0 
         R2&=0xff 
         RETF