📄 rke_tianqiu_630 over2.lst
字号:
014C 0807 00011 movf PORTC,W
014D 3903 00012 andlw b'00000011'
014E 0422 00013 iorwf Temp1,W
00014
014F 02C3 00015 subwf Key_Old,F
0150 1D03 00016 skpz
0151 01C6 00017 clrf Key_Push_Timer_Counter
0152 00C3 00018 movwf Key_Old ;Get KEY_LEARN, m_open and m_close
00019
0153 1CBD 00020 btfss MAIN_CHECK
0154 2AFE 00021 goto Key_FSM_LED_Deal_Over ;25ms get
0155 10BD 00022 bcf MAIN_CHECK
00023
00024 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00025 ;PART1: Key_LCD deal
00026 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00027
0156 00028 Key_Deal_Go:
0156 0F46 00029 incfsz Key_Push_Timer_Counter,W
0157 0AC6 00030 incf Key_Push_Timer_Counter,F
00031
0158 3004 00032 movlw d'4' ;100ms
0159 0246 00033 subwf Key_Push_Timer_Counter,W
015A 1D03 00034 skpz
015B 295E 00035 goto Key_Push_Deal_Over
015C 0843 00036 movf Key_Old,W
015D 00C4 00037 movwf Key_Flag
015E 00038 Key_Push_Deal_Over:
00039
00040 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00041 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00042
015E 3002 00043 movlw b'00000010' ;If in close, then 6=GND and RC1 == 0
015F 0244 00044 subwf Key_Flag,W
0160 1903 00045 skpnz
0161 2973 00046 goto KEY_OPEN_Begin_Test
00047
0162 3001 00048 movlw b'00000001' ;If in open, then 5=GND and RC0 == 0
0163 0244 00049 subwf Key_Flag,W
0164 1903 00050 skpnz
0165 2978 00051 goto KEY_CLOSE_Begin_Test
00052
0166 3000 00053 movlw b'00000000'
MPASM 03.80 Released RKE_TIANQIU_630.ASM 3-21-2005 14:44:34 PAGE 18
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
0167 0244 00054 subwf Key_Flag,W
0168 1D03 00055 skpz
0169 297D 00056 goto KEY_Port_Open_Close_Over;All open, imposiable
00057
016A 3001 00058 movlw b'00000001'
016B 0245 00059 subwf Key_Flag_Old,W
016C 1903 00060 skpnz
016D 2977 00061 goto Key_Open_Real_Begin
00062
016E 3002 00063 movlw b'00000010'
016F 0245 00064 subwf Key_Flag_Old,W
0170 1903 00065 skpnz
0171 297C 00066 goto Key_Close_Real_Begin
00067
0172 297D 00068 goto KEY_Port_Open_Close_Over
00069
00070
00071 ;==============================
0173 00072 KEY_OPEN_Begin_Test:
0173 3001 00073 movlw b'00000001'
0174 0245 00074 subwf Key_Flag_Old,W
0175 1D03 00075 skpz
0176 297D 00076 goto KEY_Port_Open_Close_Over
00077
0177 00078 Key_Open_Real_Begin:
0177 29F8 00079 goto Hand_Open_Begin
00080
00081 ;==============================
0178 00082 KEY_CLOSE_Begin_Test:
0178 3002 00083 movlw b'00000010'
0179 0245 00084 subwf Key_Flag_Old,W
017A 1D03 00085 skpz
017B 297D 00086 goto KEY_Port_Open_Close_Over
00087
017C 00088 Key_Close_Real_Begin:
017C 29FD 00089 goto Hand_Close_Begin
00090
017D 00091 KEY_Port_Open_Close_Over:
00092
00093 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00094 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00095
017D 0F56 00096 incfsz RKE_Learn_Time_Counter,W
017E 0AD6 00097 incf RKE_Learn_Time_Counter,F
00098
00099 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00100 ;PART: Over
00101 ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
017F 00102 NORMAL_RKE_Deal_Begin:
017F 3001 00103 movlw RKE_LEARN_READY
0180 0242 00104 subwf RKE_Learn_Status,W
0181 1803 00105 skpnc
0182 2A00 00106 goto NORMAL_RKE_Deal_Over_No_RF
MPASM 03.80 Released RKE_TIANQIU_630.ASM 3-21-2005 14:44:34 PAGE 19
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00107
0183 1F3D 00108 btfss RF_FRAME_GET
0184 2A00 00109 goto NORMAL_RKE_Deal_Over_No_RF
00110
0185 0837 00111 movf Hop_Recieve4,W
0186 0255 00112 subwf Last_Hop4,W
0187 1903 00113 skpnz
0188 29CD 00114 goto Syn_Cnt_Same_Deal
00115
00116 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00117
0189 00118 Serial_Number_Check_Begin:
0189 230B 00119 call Serial_Number_Check
018A 1C03 00120 skpc
018B 2A00 00121 goto NORMAL_RKE_Deal_Over ;C=1, Not Zero, C=0, Zero
00122
018C 00123 Normal_Key_Address_Get_Begin:
018C 3000 00124 movlw KEY1_ADDRESS
018D 00C9 00125 movwf Key_Temp_Address
018E 00126 Normal_Key_Address_Get_Loop:
018E 2318 00127 call Serial_Number_Compare
018F 1C03 00128 skpc ;=0, same as which store in the Eeprom
0190 2998 00129 goto Normal_RKE_Decrypt_Begin
0191 3010 00130 movlw 0x10
0192 07C9 00131 addwf Key_Temp_Address,F
0193 3031 00132 movlw KEY4_ADDRESS+1
0194 0249 00133 subwf Key_Temp_Address,W
0195 1C03 00134 skpc
0196 298E 00135 goto Normal_Key_Address_Get_Loop
00136
0197 2A00 00137 goto NORMAL_RKE_Deal_Over
00138
00139 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00140
0198 00141 Normal_RKE_Decrypt_Begin:
0198 11BD 00142 bcf KEY_MAY_ERROR_CHECK
00143
0199 2336 00144 call Hop_Tran
00145
019A 233F 00146 call Decrypt_Key_Tran
00147
019B 200F 00148 call DECRYPT
00149
00150 ;temp
00151 ;goto Function_Lock_Open
00152
00153 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00154
019C 00155 Syn_Count_Read:
019C 0849 00156 movf Key_Temp_Address,W
019D 00C7 00157 movwf Eeprom_Address
019E 3004 00158 movlw d'4'
019F 00C8 00159 movwf Eeprom_Number
MPASM 03.80 Released RKE_TIANQIU_630.ASM 3-21-2005 14:44:34 PAGE 20
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
01A0 304A 00160 movlw RKE_Syn_Temp1
01A1 0084 00161 movwf FSR
01A2 2114 00162 call Read_Eeprom
00163
01A3 084B 00164 movf RKE_Syn_Temp2,W
01A4 00A2 00165 movwf Temp1
01A5 084A 00166 movf RKE_Syn_Temp1,W
01A6 00A3 00167 movwf Temp2
00168
01A7 0832 00169 movf HOP2,W
01A8 00A5 00170 movwf Temp4
01A9 0833 00171 movf HOP1,W
01AA 00A4 00172 movwf Temp3 ;Hopping SYNCNT - Stored SYNCNT
00173
01AB 22FF 00174 call Sub_Bit16
00175
01AC 1FA5 00176 btfss Temp4,7
01AD 29C2 00177 goto Not_More_Than_Half ;<16384
00178
01AE 084C 00179 movf RKE_Syn_Temp3,W
01AF 00A2 00180 movwf Temp1
01B0 00CB 00181 movwf RKE_Syn_Temp2
01B1 084D 00182 movf RKE_Syn_Temp4,W
01B2 00A3 00183 movwf Temp2
01B3 00CA 00184 movwf RKE_Syn_Temp1
00185
01B4 0832 00186 movf HOP2,W
01B5 00A5 00187 movwf Temp4
01B6 0833 00188 movf HOP1,W
01B7 00A4 00189 movwf Temp3 ;Hopping SYNCNT - Stored SYNCNT
00190
01B8 22FF 00191 call Sub_Bit16
00192
01B9 1FA5 00193 btfss Temp4,7
01BA 29C2 00194 goto Not_More_Than_Half
00195
00196 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00197
00198 ;temp remove
01BB 19BD 00199 btfsc KEY_MAY_ERROR_CHECK
01BC 2A00 00200 goto NORMAL_RKE_Deal_Over ;>16384 over
01BD 15BD 00201 bsf KEY_MAY_ERROR_CHECK
00202
01BE 237A 00203 call Learn_Decrypt_Key_Get
00204
01BF 2336 00205 call Hop_Tran
00206
01C0 200F 00207 call DECRYPT ;Now get Syn_Chronous Count
01C1 299C 00208 goto Syn_Count_Read
00209
00210 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00211
01C2 00212 Not_More_Than_Half:
MPASM 03.80 Released RKE_TIANQIU_630.ASM 3-21-2005 14:44:34 PAGE 21
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
01C2 3021 00213 movlw d'33'
01C3 00A2 00214 movwf Temp1
01C4 01A3 00215 clrf Temp2
00216
01C5 22FF 00217 call Sub_Bit16
00218
01C6 1BA5 00219 btfsc Temp4,7 ;<32 then MSB = 1
01C7 29C9 00220 goto Syn_Cnt_Small_16
01C8 29CE 00221 goto Not_Small_Then_16
00222
01C9 00223 Syn_Cnt_Small_16:
01C9 084B 00224 movf RKE_Syn_Temp2,W
01CA 0233 00225 subwf HOP1,W
01CB
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -