2 zheng2637 zheng2637 于 2014.06.06 12:51 提问

汇编语言,修改下总密码。感谢大家

文件内容如下所示:大侠们帮忙,是看一下怎么修改总密码,关机密码,加减密码。感谢大家了。急!!!
P4 EQU 0D8H
BEEP BIT P1.6
S1_CD4052_9 BIT P1.7
S0_CD4052_10 BIT P4.3
D573_11 BIT P4.2 ;段
W573_11 BIT P1.0 ;位
JMPER BIT P3.4
SDA_24CXX_5 BIT P3.5
SCL_24CXX_6 BIT P3.6
RST_DS1302_5 BIT P4.0
DIO_DS1302_6 BIT P2.0
CLK_DS1302_7 BIT P3.7
ORG 0000H
SJMP MAIN
ORG 0003H
AJMP WI0
ORG 000BH
AJMP WT0
ORG 0013H
AJMP WI1
ORG 001BH
AJMP WT1
ORG 0023H
AJMP WTR
ORG 0030H
MAIN:NOP
setb S1_CD4052_9
setb S0_CD4052_10
CLR BEEP
MOV 0BFH,#02H
SETB P1.1;键盘输入线
SETB P1.2
SETB P1.3
SETB P1.4
CLR A
MOV P0,A
CLR D573_11
CLR W573_11
MOV SP,#0D0H
MOV R0,#08H
MOV R7,#248
CLR A
M1:MOV @R0,A
INC R0
DJNZ R7,M1
LCALL U
MOV IE,#9FH
MOV IP,#07H
MOV TMOD,#11H
MOV 0C8H,#34H
SETB IT0
SETB IT1
MOV TL0,#0B0H
MOV TH0,#0B9H
SETB TR0
SETB 05H
SETB 06H
MOV 08H,#8
MOV TL1,#80H
MOV TH1,#0FCH
SETB TR1
MOV 14H,#1
LCALL V
LCALL ZJ
LCALL GJPD
LCALL U
LCALL KZ
M2:NOP
JB 10H,M3
JB 11H,M3
LCALL TTR
M3:LCALL SC
LCALL KY
JZ M2
LCALL KJ
SJMP M2
ORG 0100H
ZJ:NOP
PUSH 27H
PUSH 2EH
MOV R2,#8EH
MOV R3,#00H
LCALL DTW
MOV R2,#90H
MOV R3,#0AAH
LCALL DTW
MOV R2,#8EH
MOV R3,#80H
LCALL DTW
ZJ0:MOV R7,#10
CLR A
MOV R3,A
MOV R4,A
ZJ1:MOV R6,#50
MOV A,R3
MOV 27H,A
MOV 2EH,A
MOV R0,#28H
MOV R5,#6
MOV A,R4
ZJ2:MOV @R0,A
INC R0
DJNZ R5,ZJ2
ZJ3:LCALL KY
CJNE A,#15,ZJ4
SJMP ZJ10
ZJ4:CJNE A,#12,ZJ5
LCALL CLGJ
SJMP ZJ0
ZJ5:CJNE A,#8,ZJ6
LCALL BT2
SJMP ZJ0
ZJ6:CJNE A,#6,ZJ7
LCALL BT3
SJMP ZJ0
ZJ7:CJNE A,#1,ZJ8
LCALL BT4
SJMP ZJ0
ZJ8:CJNE A,#14,ZJ9
LCALL BH
SJMP ZJ0
ZJ9:LCALL DL2
DJNZ R6,ZJ3
MOV A,R3
CPL A
MOV R3,A
INC R4
DJNZ R7,ZJ1
ZJ10:POP 2EH
POP 27H
RET
BH:PUSH 27H
PUSH 2EH
CLR A
MOV 27H,A
MOV 2EH,A
MOV DPTR,#7F2AH
LCALL MMRX
BH0:LCALL KY
CJNE A,#14,BH0
MOV DPTR,#7F2DH
LCALL MMRX
MOV 2EH,#15H
BH1:LCALL KY
CJNE A,#14,BH1
POP 2EH
POP 27H
RET
WT1:CLR 01H
CLR TR1
PUSH ACC
PUSH PSW
CLR RS0
SETB RS1
DJNZ R4,WT11
MOV R0,#26H
MOV R1,#20H
MOV R2,2EH
MOV R3,#2
MOV R4,#8
CLR A
MOV P0,A
SETB D573_11
CLR D573_11
SETB W573_11
CLR W573_11
MOV TL1,#00H
MOV TH1,#0FEH
SETB 01H
SETB 02H
SJMP WT14
WT11:CLR A
MOV P0,A
SETB D573_11
CLR D573_11
SETB W573_11
CLR W573_11
MOV A,@R0
JNB 02H,WT12
DJNZ R3,WT13
CLR 02H
WT12:ADD A,#38H
MOVC A,@A+PC
XCH A,R2
RRC A
XCH A,R2
MOV ACC.7,C
SJMP WT15
WT13:MOV P0,A
NOP
SETB D573_11
CLR D573_11
MOV A,#40H ;顺序变了
MOV P0,A
NOP
SETB W573_11
CLR W573_11
SJMP WT14
WT15:MOV P0,A
SETB D573_11
CLR D573_11
MOV A,R1
MOV P0,A
NOP
SETB W573_11
CLR W573_11
MOV A,R1
RR A
MOV R1,A
WT14:MOV TL1,#80H
MOV TH1,#0FCH
INC R0
SETB TR1
POP PSW
POP ACC
RETI
TAB:DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH;0,1,2,3,4,5,6,7,8,9
DB 77H,7CH,39H,5EH,79H,71H,00H,40H,48H,76H;A,B,C,D,E,F, ,-,
DB 0EH,38H,54H,5CH,73H,50H,78H,1CH,6EH

DL:PUSH 07H
MOV 07H,#250
DL0:NOP
NOP
NOP
DJNZ 07H,DL0
POP 07H
RET
DL1:NOP
ACALL DL
ACALL DL
RET
DL2:NOP
ACALL DL1
ACALL DL1
RET
DL3:PUSH 07H
MOV 07H,#20
DL30:NOP
NOP
NOP
DJNZ 07H,DL30
POP 07H
RET
KY:ACALL DL2
PUSH PSW
SETB RS0
SETB RS1
ACALL KYB
JNZ KY2 ;如果A=0,说明没有按键按下
KY1:POP PSW
RET
KY2:MOV R2,A
ACALL KYB4
JNZ KY1
ACALL DL2
ACALL KYB;第二次判断
CJNE A,1AH,KY1;1AH就是R2
SETB BEEP
KY3:ACALL DL2
ACALL KYB;判断有没有松开
JNZ KY3
MOV A,R2
CLR BEEP
POP PSW
RET
KYB:NOP
CLR A
MOV R3,A
MOV R4,A
MOV R5,A
MOV R6,#0FEH;置最低位为0,开始扫描
MOV R7,#4 ;4跟行线
KYB1:JNB 01H,KYB1
CLR TR1
KYB2:MOV A,R6
MOV P0,A
SETB W573_11
CLR W573_11
NOP
NOP
MOV C,P1.4
ACALL KYC
MOV C,P1.3
ACALL KYC
MOV C,P1.2
ACALL KYC
MOV C,P1.1
ACALL KYC
MOV A,R6
RL A
MOV R6,A
DJNZ R7,KYB2
CLR A
MOV P0,A
SETB W573_11
CLR W573_11
SETB TR1
MOV R7,#16
KYB3:CLR C
MOV A,R5
RRC A
MOV R5,A
MOV A,R4
RRC A
MOV R4,A
MOV A,R3
RRC A
MOV R3,A
JNC KYB5
KYB4:DJNZ R7,KYB3
CLR A
RET
KYB5:MOV A,R7
RET
KYC:MOV A,R3
RLC A
MOV R3,A
MOV A,R4
RLC A
MOV R4,A
MOV A,R5
RLC A
MOV R5,A
RET
WT0:CLR TR0
JNB 06H,WT01
MOV TL0,#00H
MOV TH0,#00H
clr S1_CD4052_9
setb S0_CD4052_10
SETB TR0
CLR 06H
RETI
WT01:MOV TL0,#00H
MOV TH0,#00H
setb S1_CD4052_9
clr S0_CD4052_10
SETB TR0
SETB 06H
RETI
WI0:PUSH ACC
PUSH PSW
CLR RS1
SETB RS0
CLR TR0
clr S1_CD4052_9
clr S0_CD4052_10
MOV R1,TL0
MOV R2,TH0
CLR A
MOV TL0,A
MOV TH0,A
SETB TR0
CLR A
MOV R3,A
MOV R7,#4
WI01:CLR C
MOV A,R1
RLC A
MOV R1,A
MOV A,R2
RLC A
MOV R2,A
MOV A,R3
RLC A
MOV R3,A
DJNZ R7,WI01
MOV A,R4
ADD A,R1
MOV R4,A
MOV A,R5
ADDC A,R2
MOV R5,A
MOV A,R6
ADDC A,R3
MOV R6,A
POP PSW
POP ACC
RETI
WI1:PUSH ACC
PUSH PSW
CLR RS1
SETB RS0
CLR TR0
MOV R1,TL0
MOV R2,TH0
MOV TL0,#0B0H
MOV TH0,#0B9H
SJMP WIAD
WIEND:CLR A
MOV R4,A
MOV R5,A
MOV R6,A
WIENE:SETB 06H
POP PSW
POP ACC
RETI
WIAD:DJNZ R0,WIX
setb S1_CD4052_9
setb S0_CD4052_10
SETB TR0
JB 1BH,W4
ACALL WII
MOV R1,#0A0H
MOV R0,#24
MOV A,R6
W1:XCH A,@R1
INC R1
DJNZ R0,W1
MOV R1,#0A0H
MOV R0,#24
MOV A,R5
W2:XCH A,@R1
INC R1
DJNZ R0,W2
MOV R1,#0A0H
MOV R0,#24
MOV A,R4
W3:XCH A,@R1
INC R1
DJNZ R0,W3
W4:CLR A
MOV R4,A
MOV R5,A
MOV R6,A
MOV R0,#8
SETB 04H
SJMP WIEND
WIX:setb S1_CD4052_9
setb S0_CD4052_10
SETB TR0
ACALL WII
SJMP WIENE
WII:CLR C
MOV A,R4
SUBB A,R1
MOV R4,A
MOV A,R5
SUBB A,R2
MOV R5,A
MOV A,R6
SUBB A,#0
MOV R6,A
RET
WTR:JNB 0AH,TRA
SJMP TRB
TRA:CLR TI
JB 10H,TRA1
RETI
TRA1:PUSH ACC
PUSH PSW
SETB RS0
SETB RS1
MOV A,@R0
MOV SBUF,A
INC R0
DJNZ R1,TRA2
CLR 10H
TRA2:POP PSW
POP ACC
RETI
TRB:CLR TI
JB 10H,TRB1
RETI
TRB1:PUSH ACC
PUSH PSW
SETB RS1
SETB RS0
SETB TB8
MOV A,@R0
MOV SBUF,A
INC R0
DJNZ R1,TRB2
CLR 10H
TRB2:POP PSW
POP ACC
RETI

TTC:MOV R0,#0C0H
MOV R1,46H
MOV R2,47H
MOV R3,#0
MOV R4,30H
LCALL MU1
LCALL BCD24
MOV R0,#0C5H
MOV R1,#72H
MOV R7,#3
TTC1:MOV A,@R1
SWAP A
ANL A,#0FH
ADD A,#30H
MOV @R0,A
DEC R0
MOV A,@R1
ANL A,#0FH
ADD A,#30H
MOV @R0,A
DEC R0
DEC R1
DJNZ R7,TTC1
MOV A,31H
JZ TTC3
MOV R0,#0C0H
MOV A,R0
ADD A,31H
MOV R0,A

MOV A,#2EH ; '.'
TTC2:XCH A,@R0
INC R0
CJNE R0,#0C7H,TTC2
SJMP TTC4

TTC3:MOV R0,#0C6H
MOV @R0,#30H
INC R0
TTC4:JNB 0CH,TTC5
MOV @R0,#2DH ;'-'
SJMP TTC6

TTC5:MOV @R0,#30H
TTC6:MOV 18H,#0C0H
MOV 19H,#8
MOV A,#03DH;=打头
MOV SBUF,A
SETB 10H
SETB 11H
RET

TTR:MOV A,37H
JB ACC.3,TTC
JNB 0AH,TTA;0ah=0 为托利多格式
SJMP TTB
TTA:MOV R0,#0C0H
MOV @R0,#20H
MOV A,31H
CJNE A,#1,TTA1
MOV @R0,#23H
SJMP TTA4
TTA1:CJNE A,#2,TTA2
MOV @R0,#24H
SJMP TTA4
TTA2:CJNE A,#3,TTA3
MOV @R0,#25H
SJMP TTA4
TTA3:CJNE A,#4,TTA4
MOV @R0,#26H
TTA4:INC R0
MOV A,#30H
JNB 0FH,TTA5
SETB ACC.2
TTA5:JNB 0CH,TTA6
SETB ACC.1
TTA6:JNB 0DH,TTA7
SETB ACC.3
TTA7:MOV @R0,A
INC R0
MOV @R0,#20H
MOV R1,46H
MOV R2,47H
MOV R3,#0
MOV R4,30H
LCALL MU1
LCALL BCD24
MOV R0,#0C3H
MOV R1,#72H
MOV R7,#3
TTA9:MOV A,@R1
SWAP A
ANL A,#0FH
ADD A,#30H
MOV @R0,A
INC R0
MOV A,@R1
ANL A,#0FH
ADD A,#30H
MOV @R0,A
INC R0
DEC R1
DJNZ R7,TTA9
MOV @R0,#0DH
INC R0
MOV @R0,#0AH
MOV 18H,#0C0H
MOV 19H,#11
MOV A,#02H
MOV SBUF,A
SETB 10H
SETB 11H
RET
TTB:MOV R0,#0C0H
CLR A
JNB 0FH,TTB1
SETB ACC.7
TTB1:JNB 0CH,TTB2
SETB ACC.5
TTB2:JB 0DH,TTB3
SETB ACC.4
TTB3:MOV @R0,A
MOV A,31H
INC A
ORL A,@R0
MOV @R0,A
MOV R1,46H
MOV R2,47H
MOV R3,#0
MOV R4,30H
LCALL MU1
LCALL BCD24
MOV R0,#0C1H
MOV R1,#70H
MOV R7,#3
TTB4:MOV A,@R1
MOV @R0,A
INC R0
INC R1
DJNZ R7,TTB4
MOV 18H,#0C0H
MOV 19H,#4
SETB TB8
MOV A,#0FFH
MOV SBUF,A
SETB 10H
SETB 11H
RET
ADS:NOP
CLR A
MOV R1,A
MOV R2,A
MOV R3,A
MOV R0,#0A0H
MOV R7,#8
ADS0:MOV A,@R0
ADD A,R1
MOV R1,A
INC R0
MOV A,@R0
ADDC A,R2
MOV R2,A
INC R0
MOV A,@R0
ADDC A,R3
MOV R3,A
INC R0
DJNZ R7,ADS0
MOV R7,#5
ADS1:CLR C
MOV A,R3
RRC A
MOV R3,A
MOV A,R2
RRC A
MOV R2,A
MOV A,R1
RRC A
MOV R1,A
DJNZ R7,ADS1
;LCALL ADY
RET
ADX:NOP
CLR A
MOV R1,A
MOV R2,A
MOV R3,A
MOV R0,#0A0H
MOV R7,#8
ADX0:MOV A,@R0
ADD A,R1
MOV R1,A
INC R0
MOV A,@R0
ADDC A,R2
MOV R2,A
INC R0
MOV A,@R0
ADDC A,R3
MOV R3,A
INC R0
DJNZ R7,ADX0
MOV R7,#6
ADX1:CLR C
MOV A,R3
RRC A
MOV R3,A
MOV A,R2
RRC A
MOV R2,A
MOV A,R1
RRC A
MOV R1,A
DJNZ R7,ADX1
RET

SU:NOP
ACALL ADS
CLR 0CH
CLR C
MOV A,R1
SUBB A,43H
MOV R1,A
MOV A,R2
SUBB A,44H
MOV R2,A
MOV A,R3
SUBB A,45H
MOV R3,A
JNC SU0
LCALL CPA
SETB 0CH
CLR 19H
CLR 1AH
SU0:PUSH 00H
PUSH 07H
MOV R4,3DH
MOV R5,3EH
MOV R6,3FH
LCALL MU3
MOV R0,#70H
MOV R7,#5
CLR C
SU1:MOV A,@R0
RLC A
MOV @R0,A
INC R0
DJNZ R7,SU1
MOV 79H,3AH
MOV 7AH,3BH
MOV 7BH,3CH
LCALL DV3
POP 07H
POP 00H
RET
KJ:CJNE A,#8,KJ1
LCALL BT1
RET
KJ1:CJNE A,#14,KJ2
LCALL DATE
LCALL TIME
RET
KJ2:CJNE A,#13,KJ3
JNB 13H,KJ21
CLR P2.3
KJ20:LCALL KY
CJNE A,#13,KJ20
SETB P2.3
KJ21:RET
KJ3:CJNE A,#4,KJ4
LCALL ZZ
RET
KJ4:CJNE A,#11,KJ5
LCALL RPT
RET
KJ5:CJNE A,#10,KJ6
LCALL DYSZ
RET
KJ6:CJNE A,#5,KJ7
JB 0FH,KJ60
JB 15H,KJ60
LCALL ZP
KJ60:RET
KJ7:CJNE A,#1,KJ8
JB 0FH,KJ14
LCALL YCCC
RET
KJ8:CJNE A,#2,KJ9
JB 0FH,KJ80
JB 15H,KJ80
LCALL ECCC
KJ80:RET
KJ9:CJNE A,#12,KJ10
LCALL CLEAR
RET
KJ10:CJNE A,#9,KJ11
LCALL QP
RET
KJ11:CJNE A,#6,KJ12
LCALL ZX
RET
KJ12:CJNE A,#3,KJ13
LCALL BTKLAA
RET
KJ13:CJNE A,#7,KJ14
JNB 13H,KJ14
LCALL BB
RET
KJ14:CJNE A,#15,KJ15
CLR A
MOV 38H,A;取消扣率
MOV 39H,A
MOV DPTR,#7F18H
CALL WRIT
INC DPTR
CALL WRIT
RET
KJ15:RET
SK:NOP
SETB P1.5
JB P1.5,SK0
ORL 27H,#20H
ANL 27H,#0EFH
RET
SK0:NOP
ANL 27H,#0DFH
SETB P4.1
JB P4.1,SK1
ORL 27H,#10H
RET
SK1:ANL 27H,#0EFH
RET

WE:PUSH 07H
MOV R7,#8
WE1:RLC A
MOV SDA_24CXX_5,C
NOP
SETB SCL_24CXX_6
NOP
CLR SCL_24CXX_6
DJNZ R7,WE1
POP 07H
SETB SCL_24CXX_6
NOP
CLR SCL_24CXX_6
RET
WRIT:NOP
PUSH ACC
CLR SDA_24CXX_5
NOP
CLR SCL_24CXX_6
MOV A,#0A0H
ACALL WE
MOV A,DPH
ACALL WE
MOV A,DPL
ACALL WE
POP ACC
PUSH ACC
ACALL WE
CLR SDA_24CXX_5
NOP
SETB SCL_24CXX_6
NOP
SETB SDA_24CXX_5
LCALL DL2
POP ACC
RET
RE:PUSH 07H
MOV R7,#8
CLR A
RE1:SETB SCL_24CXX_6
NOP
MOV C,SDA_24CXX_5
RLC A
CLR SCL_24CXX_6
DJNZ R7,RE1
POP 07H
SETB SDA_24CXX_5
NOP
SETB SCL_24CXX_6
NOP
CLR SCL_24CXX_6
RET
WF:CLR SDA_24CXX_5
NOP
CLR SCL_24CXX_6
MOV A,#0A0H
ACALL WE
MOV A,DPH
ACALL WE
MOV A,DPL
ACALL WE
RET
READ:ACALL WF
SETB SDA_24CXX_5
NOP
SETB SCL_24CXX_6
NOP
CLR SDA_24CXX_5
NOP
CLR SCL_24CXX_6
MOV A,#0A1H
ACALL WE
ACALL RE
CLR SDA_24CXX_5
NOP
SETB SCL_24CXX_6
NOP
SETB SDA_24CXX_5
RET
WP:CLR SDA_24CXX_5
NOP
CLR SCL_24CXX_6
MOV A,#0A0H
LCALL WE
MOV A,DPH
LCALL WE
MOV A,DPL
LCALL WE
PUSH 07H
MOV R7,#32
WP1:CLR A
LCALL WE
DJNZ R7,WP1
POP 07H
CLR SDA_24CXX_5
NOP
SETB SCL_24CXX_6
NOP
SETB SDA_24CXX_5
LCALL DL2
RET
DTW:SETB RST_DS1302_5
MOV A,R2
MOV R4,#8
DTW1:RRC A
MOV DIO_DS1302_6,C
NOP
NOP
SETB CLK_DS1302_7
NOP
NOP
CLR CLK_DS1302_7
DJNZ R4,DTW1
MOV A,R3
MOV R4,#8
DTW2:RRC A
MOV DIO_DS1302_6,C
NOP
NOP
SETB CLK_DS1302_7
NOP
NOP
CLR CLK_DS1302_7
DJNZ R4,DTW2
NOP
NOP
CLR RST_DS1302_5
RET
DTR:SETB RST_DS1302_5
MOV A,R2
MOV R4,#8
DTR1:RRC A
MOV DIO_DS1302_6,C
NOP
NOP
SETB CLK_DS1302_7
NOP
NOP
CLR CLK_DS1302_7
DJNZ R4,DTR1
NOP
NOP
SETB DIO_DS1302_6
CLR A
CLR C
MOV R4,#8
DTR2:MOV C,DIO_DS1302_6
RRC A
NOP
NOP
SETB CLK_DS1302_7
NOP
NOP
CLR CLK_DS1302_7
NOP
NOP
DJNZ R4,DTR2
MOV R3,A
CLR RST_DS1302_5
RET
TMW:MOV R2,#8EH
MOV R3,#00H
CALL DTW
MOV R2,#80H
MOV R3,#00H
CALL DTW
MOV R0,#54H
MOV R2,#8CH
MOV A,@R0
MOV R3,A
CALL DTW
INC R0
MOV R5,#88H
MOV R7,#4
TMW1:MOV A,R5
MOV R2,A
MOV A,@R0
MOV R3,A
LCALL DTW
INC R0
MOV A,R5
DEC A
DEC A
MOV R5,A
DJNZ R7,TMW1
MOV R2,#8EH
MOV R3,#80H
LCALL DTW
RET
TMR:MOV R0,#54H
MOV R2,#8DH
LCALL DTR
MOV A,R3
MOV @R0,A
INC R0
MOV R5,#89H
MOV R7,#4
TMR1:MOV A,R5
MOV R2,A
LCALL DTR
MOV A,R3
MOV @R0,A
INC R0
MOV A,R5
DEC A
DEC A
MOV R5,A
DJNZ R7,TMR1
RET
BCD8:CLR A
MOV R2,A
MOV R3,A
MOV R7,#8
BCD81:CLR C
MOV A,R1
RLC A
MOV R1,A
MOV A,R2
ADDC A,R2
DA A
MOV R2,A
MOV A,R3
ADDC A,R3
DA A
MOV R3,A
DJNZ R7,BCD81
RET
BCD24:PUSH 00H
PUSH 06H
PUSH 07H
MOV R0,#70H
MOV R7,#3
CLR A
B1:MOV @R0,A
INC R0
DJNZ R7,B1
MOV R7,#24
B2:MOV R0,#01H
MOV R6,#3
CLR C
B3:MOV A,@R0
RLC A
MOV @R0,A
INC R0
DJNZ R6,B3
MOV R0,#70H
MOV R6,#3
B4:MOV A,@R0
ADDC A,@R0
DA A
MOV @R0,A
INC R0
DJNZ R6,B4
DJNZ R7,B2
POP 07H
POP 06H
POP 00H
RET
BCD32:PUSH 00H
PUSH 06H
PUSH 07H
MOV R0,#70H
MOV R7,#4
CLR A
C1:MOV @R0,A
INC R0
DJNZ R7,C1
MOV R7,#32
C2:MOV R0,#01H
MOV R6,#4
CLR C
C3:MOV A,@R0
RLC A
MOV @R0,A
INC R0
DJNZ R6,C3
MOV R0,#70H
MOV R6,#4
C4:MOV A,@R0
ADDC A,@R0
DA A
MOV @R0,A
INC R0
DJNZ R6,C4
DJNZ R7,C2
POP 07H
POP 06H
POP 00H
RET
DCBB:MOV A,R2
ANL A,#0FH
MOV R1,A
MOV A,R2
SWAP A
ANL A,#0FH
MOV B,#10
MUL AB
ADD A,R1
MOV R1,A
MOV A,R3
ANL A,#0FH
MOV B,#100
MUL AB
ADD A,R1
MOV R1,A
RET
DCB:CLR A
MOV R1,A
MOV R2,A
MOV R3,A
MOV R0,#06H
MOV R7,#3
D1:PUSH 04H
MOV R4,#10
LCALL MU1
POP 04H
MOV A,@R0
ANL A,#0F0H
SWAP A
ACALL DCBA
PUSH 04H
MOV R4,#10
LCALL MU1
POP 04H
MOV A,@R0
ANL A,#0FH
ACALL DCBA
DEC R0
DJNZ R7,D1
RET
DCBA:ADD A,R1
MOV R1,A
CLR A
ADDC A,R2
MOV R2,A
CLR A
ADDC A,R3
MOV R3,A
RET
MU1:PUSH 00H
PUSH 05H
PUSH 07H
MOV R0,#01H
MOV R5,#0
MOV R7,#3
CLR C
MU10:MOV A,@R0
MOV B,R4
PUSH PSW
MUL AB
POP PSW
ADDC A,R5
MOV @R0,A
MOV R5,B
INC R0
DJNZ R7,MU10
POP 07H
POP 05H
POP 00H
RET
MU2:PUSH 00H
PUSH 07H
MOV R0,#70H
MOV R7,#5
CLR A
MU20:MOV @R0,A
INC R0
DJNZ R7,MU20
MOV A,R4
MOV B,R1
MUL AB
MOV R0,#70H
ACALL MU2A
MOV A,R4
MOV B,R2
MUL AB
MOV R0,#71H
ACALL MU2A
MOV A,R5
MOV B,R1
MUL AB
MOV R0,#71H
ACALL MU2A
MOV A,R4
MOV B,R3
MUL AB
MOV R0,#72H
ACALL MU2A
MOV A,R5
MOV B,R2
MUL AB
MOV R0,#72H
ACALL MU2A
MOV A,R5
MOV B,R3
MUL AB
MOV R0,#73H
ACALL MU2A
MOV R1,70H
MOV R2,71H
MOV R3,72H
MOV R4,73H
POP 07H
POP 00H
RET
MU2A:ADD A,@R0
MOV @R0,A
INC R0
MOV A,B
ADDC A,@R0
MOV @R0,A
MU2B:MOV F0,C
CJNE R0,#74H,MU2C
RET
MU2C:INC R0
CLR A
MOV C,F0
ADDC A,@R0
MOV @R0,A
SJMP MU2B
MU3:PUSH 00H
PUSH 07H
MOV R0,#70H
MOV R7,#6
CLR A
MU30:MOV @R0,A
INC R0
DJNZ R7,MU30
MOV A,R4
MOV B,R1
MUL AB
MOV R0,#70H
ACALL MU3A
MOV A,R4
MOV B,R2
MUL AB
MOV R0,#71H
ACALL MU3A
MOV A,R5
MOV B,R1
MUL AB
MOV R0,#71H
ACALL MU3A
MOV A,R4
MOV B,R3
MUL AB
MOV R0,#72H
ACALL MU3A
MOV A,R5
MOV B,R2
MUL AB
MOV R0,#72H
ACALL MU3A
MOV A,R6
MOV B,R1
MUL AB
MOV R0,#72H
ACALL MU3A
MOV A,R5
MOV B,R3
MUL AB
MOV R0,#73H
ACALL MU3A
MOV A,R6
MOV B,R2
MUL AB
MOV R0,#73H
ACALL MU3A
MOV A,R6
MOV B,R3
MUL AB
MOV R0,#74H
ACALL MU3A
POP 07H
POP 00H
RET
MU3A:ADD A,@R0
MOV @R0,A
INC R0
MOV A,B
ADDC A,@R0
MOV @R0,A
MU3B:MOV F0,C
CJNE R0,#75H,MU3C
RET
MU3C:INC R0
CLR A
MOV C,F0
ADDC A,@R0
MOV @R0,A
SJMP MU3B
MU4:PUSH 00H
PUSH 06H
PUSH 07H
MOV R0,#01H
MOV R6,#0
MOV R7,#4
CLR C
MU40:MOV A,@R0
MOV B,R5
PUSH PSW
MUL AB
POP PSW
ADDC A,R6
MOV @R0,A
MOV R6,B
INC R0
DJNZ R7,MU40
POP 07H
POP 06H
POP 00H
RET
CPC:MOV A,R1
ADD A,#1
MOV R1,A
MOV A,R2
ADDC A,#0
MOV R2,A
MOV A,R3
ADDC A,#0
MOV R3,A
RET

DV1:PUSH 05H
PUSH 06H
PUSH 07H
CLR A
MOV R5,A
MOV R6,A
MOV R7,#24
CLR F0
ACALL RLN1
DV10:CLR C
MOV A,R5
SUBB A,R4
MOV R5,A
MOV A,R6
SUBB A,#0
MOV R6,A
JC DV12
SETB F0
DV11:ACALL RLN1
DJNZ R7,DV10
POP 07H
POP 06H
POP 05H
RET
DV12:MOV A,R5
ADD A,R4
MOV R5,A
MOV A,R6
ADDC A,#0
MOV R6,A
CLR F0
SJMP DV11
RLN1:MOV C,F0
MOV A,R1
RLC A
MOV R1,A
MOV A,R2
RLC A
MOV R2,A
MOV A,R3
RLC A
MOV R3,A
MOV A,R5
RLC A
MOV R5,A
MOV A,R6
RLC A
MOV R6,A
RET
DV2:PUSH 07H
CLR A
MOV 70H,A
MOV 71H,A
MOV 72H,A
MOV R7,#32
CLR F0
ACALL RLN2
DV20:CLR C
MOV A,70H
SUBB A,R5
MOV 70H,A
MOV A,71H
SUBB A,R6
MOV 71H,A
MOV A,72H
SUBB A,#0
MOV 72H,A
JC DV22
SETB F0
DV21:ACALL RLN2
DJNZ R7,DV20
CLR C
MOV A,70H
SUBB A,R5
MOV A,71H
SUBB A,R6
MOV A,72H
SUBB A,#0
JC DV2X
ACALL CPC
DV2X:POP 07H
RET
DV22:MOV A,70H
ADD A,R5
MOV 70H,A
MOV A,71H
ADDC A,R6
MOV 71H,A
MOV A,72H
ADDC A,#0
MOV 72H,A
CLR F0
SJMP DV21
RLN2:MOV C,F0
MOV A,R1
RLC A
MOV R1,A
MOV A,R2
RLC A
MOV R2,A
MOV A,R3
RLC A
MOV R3,A
MOV A,R4
RLC A
MOV R4,A
MOV A,70H
RLC A
MOV 70H,A
MOV A,71H
RLC A
MOV 71H,A
MOV A,72H
RLC A
MOV 72H,A
RET
DV3:PUSH 00H
PUSH 06H
PUSH 07H
MOV R0,#75H
MOV R7,#3
CLR A
DV30:MOV @R0,A
INC R0
DJNZ R7,DV30
MOV R7,#40
CLR F0
ACALL RLN3
DV31:CLR C
MOV R0,#75H
MOV R1,#79H
MOV R6,#3
DV32:MOV A,@R0
SUBB A,@R1
MOV @R0,A
INC R0
INC R1
DJNZ R6,DV32
JC DV36
SETB F0
DV33:ACALL RLN3
DJNZ R7,DV31
MOV R1,70H
MOV R2,71H
MOV R3,72H
POP 07H
POP 06H
POP 00H
RET
DV36:CLR C
MOV R0,#75H
MOV R1,#79H
MOV R6,#3
DV37:MOV A,@R0
ADDC A,@R1
MOV @R0,A
INC R0
INC R1
DJNZ R6,DV37
CLR F0
SJMP DV33
RLN3:MOV C,F0
MOV R0,#70H
MOV R6,#8
RLN31:MOV A,@R0
RLC A
MOV @R0,A
INC R0
DJNZ R6,RLN31
RET
BB:PUSH 27H
PUSH 2EH
PUSH 4AH
PUSH 4BH
CLR A
MOV 4AH,A
MOV 4BH,A
ANL 27H,#32H
MOV 2EH,#00H
MOV 2DH,#15H
MOV 2CH,#01H
MOV 2BH,#05H
MOV 2AH,#1AH
MOV 29H,#10H
MOV 28H,#1
BB0:LCALL KA
JB 07H,BB7
JB 08H,BB1
MOV 28H,A
SJMP BB0
BB1:MOV A,28H
CJNE A,#1,BB2
ACALL TOTC
SJMP BB7
BB2:CJNE A,#2,BB3
ACALL TOTH
SJMP BB7
BB3:CJNE A,#3,BB7
ACALL TOTA
BB7:POP 4BH
POP 4AH
POP 2EH
POP 27H
RET
TOA:MOV DPL,6EH
MOV DPH,6FH
LCALL CO
MOV A,5EH
ADD A,60H
MOV 60H,A
MOV A,5FH
ADDC A,61H
MOV 61H,A
CLR A
ADDC A,62H
MOV 62H,A
CLR A
ADDC A,63H
MOV 63H,A
MOV DPL,6EH
MOV DPH,6FH
MOV A,51H
ORL A,#0A0H
LCALL WRIT
LCALL LH15
RET
TOB:CLR A
MOV 60H,A
MOV 61H,A
MOV 62H,A
MOV 63H,A
RET
TOC:MOV DPL,6EH
MOV DPH,6FH
LCALL CO
MOV A,5EH
ADD A,60H
MOV 60H,A
MOV A,5FH
ADDC A,61H
MOV 61H,A
CLR A
ADDC A,62H
MOV 62H,A
CLR A
ADDC A,63H
MOV 63H,A
MOV DPL,6EH
MOV DPH,6FH
LCALL LH15
RET
TOTC:CLR 17H
CLR 18H
ACALL TOB
OC0:MOV DPTR,#1000H
OC1:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
JZ OC6
CJNE A,#0F0H,OC5
SETB 17H
ACALL TOA
OC2:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
MOV R4,A
ANL A,#0F0H
JZ OC4
CJNE A,#0F0H,OC3
MOV A,R4
ANL A,#0FH
CJNE A,51H,OC3
INC DPTR
LCALL READ
CJNE A,52H,OC3
INC DPTR
LCALL READ
CJNE A,53H,OC3
ACALL TOA
SJMP OC2
OC3:MOV DPL,6EH
MOV DPH,6FH
LCALL LH15
SJMP OC2
OC4:LCALL TCP
ACALL TOB
SJMP OC0
OC5:LCALL LH15
SJMP OC1
OC6:JB 17H,OC8
LCALL E13
OC7:LCALL CL15
RET
OC8:LCALL TT2
MOV DPTR,#1000H
OC9:LCALL READ
JZ OC7
ORL A,#0F0H
LCALL WRIT
LCALL LH15
SJMP OC9
TOTH:CLR 17H
CLR 18H
ACALL TOB
OH0:MOV DPTR,#1000H
OH1:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
JZ OH6
CJNE A,#0F0H,OH5
SETB 17H
ACALL TOA
OH2:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
JZ OH4
CJNE A,#0F0H,OH3
CLR C
MOV A,DPL
ADD A,#8
MOV DPL,A
MOV A,DPH
ADDC A,#0
MOV DPH,A
LCALL READ
CJNE A,59H,OH3
ACALL TOA
SJMP OH2
OH3:MOV DPL,6EH
MOV DPH,6FH
LCALL LH15
SJMP OH2
OH4:LCALL THP
ACALL TOB
SJMP OH0
OH5:LCALL LH15
SJMP OH1
OH6:JB 17H,OH8
LCALL E13
OH7:LCALL CL15
RET
OH8:LCALL TT2
MOV DPTR,#1000H
OH9:LCALL READ
JZ OH7
ORL A,#0F0H
LCALL WRIT
LCALL LH15
SJMP OH9
TOTA:CLR 17H
ACALL TOB
MOV DPTR,#1000H
OA1:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
JZ OA2
SETB 17H
ACALL TOC
MOV DPL,6EH
MOV DPH,6FH
LCALL LH15
SJMP OA1
OA2:JNB 17H,OA3
LCALL TAP
RET
OA3:LCALL E13
RET
V:MOV DPTR,#7FFFH
LCALL READ
CJNE A,#0AAH,V0
RET
V0:MOV 2EH,#00H
MOV 2DH,#13H
MOV 2CH,#1AH
MOV 2BH,#02H
MOV 2AH,#00H
MOV 29H,#00H
MOV 28H,#00H
MOV 27H,#00H
MOV DPTR,#7FFFH
MOV A,#0AAH
LCALL WRIT
MOV DPTR,#7F40H
MOV R7,#80
V1:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,V1
MOV DPTR,#7F00H
MOV A,#01H
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
MOV DPTR,#7F27H
MOV A,#99H
LCALL WRIT
INC DPTR
MOV A,#34H
LCALL WRIT
INC DPTR
MOV A,#12H
LCALL WRIT
INC DPTR
MOV R7,#6
V2:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,V2
MOV DPTR,#7F07H
MOV R7,#9
V3:MOV A,#88H
LCALL WRIT
INC DPTR
DJNZ R7,V3
MOV DPTR,#7F10H
MOV A,#10
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
INC DPTR
MOV A,#30H
LCALL WRIT
INC DPTR
MOV A,#75H
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
INC DPTR
MOV A,#23H
LCALL WRIT
INC DPTR
MOV A,#34H
LCALL WRIT
INC DPTR
MOV A,#12H
LCALL WRIT
INC DPTR
MOV A,#10H
MOV A,#0
LCALL WRIT
INC DPTR
MOV A,#27H
MOV A,#0
LCALL WRIT
MOV DPTR,#0000H
V4:LCALL WP
MOV A,DPL
ADD A,#32
MOV DPL,A
MOV A,DPH
ADDC A,#0
MOV DPH,A
CJNE A,#7FH,V4
MOV DPTR,#0000H
V5:LCALL READ
JNZ V6
INC DPTR
MOV A,DPH
CJNE A,#7FH,V5
RET
V6:LCALL E11
RET

BT1:NOP
BT10:SETB P3.4
JNB P3.4,BT11
RET
BT11:MOV R0,#20H
MOV A,2EH
MOVX @R0,A
INC R0
MOV A,27H
MOVX @R0,A
PUSH 27H
PUSH 2EH
ANL 27H,#32H
MOV 7FH,2EH
MOV 2EH,#0
LCALL MM1
JB 22H,BTKL;进入扣率功能密码正确,扣率重量标定
JB 09H,BT13
JB 1EH,BT19
BT12:NOP
POP 2EH
POP 27H
LCALL U
MOV DPL,#18H
MOV A,#10H
MOV A,#0
;MOV 38H,A
;LCALL WRIT
INC DPL
MOV A,#27H
MOV A,#0
;MOV 39H,A
;LCALL WRIT
RET
BT13:MOV 28H,#1
MOV 29H,#10H
MOV 2AH,#10H
MOV 2BH,#15H
MOV 2CH,#0AH
MOV 2DH,#0CH
BT14:LCALL KA
JB 07H,BT12
JB 08H,BT15
MOV 28H,A
SJMP BT14
BT15:MOV A,28H
CJNE A,#1,BT16
LCALL BTC
SJMP BT12
BT16:CJNE A,#2,BT17
LCALL BTZ
SJMP BT12
BT17:CJNE A,#3,BT18
LCALL BTBZ
SJMP BT12
BT18:CJNE A,#4,BT12
LCALL BTV
SJMP BT12
BT19:LCALL BTBS
POP 2EH
POP 27H
RET

BTKL:CLR 0CH
CLR A
MOV 70H,A
MOV 71H,A
MOV 72H,A;初始显示P 0
MOV R0,#20H
MOVX A,@R0
MOV 2EH,A
INC R0
MOVX A,@R0
MOV 27H,A
CLR 2CH
BTK1:LCALL SY;将70~72H中内容送28~2DH显示
MOV 2DH,#11H;显示-
SJMP BTK11
BTK10:LCALL SY
MOV 2DH,#10H
BTK11:LCALL KA
JNB 2BH,BTK12;清除键按下标志位
CPL 2CH;扣率加减标志位
SJMP BTK13
BTK12:JB 07H,BTK5
JB 08H,BTK2
LCALL BTCA
BTK13:JNB 2CH,BTK1
SJMP BTK10
BTK2:JNB 2CH,BTK21
MOV A,#01H
MOV DPTR,#7F28H
CALL WRIT
SJMP BTK22
BTK21:CLR A
MOV DPTR,#7F28H
CALL WRIT
BTK22:LCALL BTCB
;MOV A,R1;判断皮重是否为0
;JNZ ZP3
;MOV A,R2
;JNZ ZP3
;RET
BTK3:MOV R3,#0
MOV R4,30H
CALL DV1
MOV 38H,R1
MOV 39H,R2
MOV A,R1
MOV DPTR,#7F18H
LCALL WRIT
MOV A,R2
MOV DPTR,#7F19H
LCALL WRIT
MOV R0,#0
MOV A,R1
MOVX @R0,A
INC R0
MOV A,R2
MOVX @R0,A
;ORL 27H,#08H
;SETB 2AH;是否重新打印菜单头标志位
BTK5:POP 2EH
POP 27H
;LCALL BTKLAAD
RET
;BTK4:CLR 15H
;ANL 27H,#0F7H
;CLR A
;MOV 6CH,A
;MOV 6DH,A
XX:MOV R0,#28H
XX1:XCH A,@R0
INC R0
DJNZ R7,XX1
RET
X2:MOV R7,#2
ACALL XX
RET
X3:MOV R7,#3
ACALL XX
RET
X4:MOV R7,#4
ACALL XX
RET
X5:MOV R7,#5
ACALL XX
RET
X6:MOV R7,#6
ACALL XX
RET
BTBZ:MOV DPTR,#7F18H
MOV A,#10H
MOV A,#0
;MOV 38H,A
;LCALL WRIT
INC DPTR
MOV A,#27H
MOV A,#0
;MOV 39H,A
;LCALL WRIT
BTBZ0:JNB 04H,BTBZ1
CLR 04H
LCALL SU
MOV R4,30H
LCALL DV1
LCALL CPB
LCALL BEX
MOV R4,30H
LCALL MU1
LCALL BCD24
LCALL SY
BTBZ1:LCALL KY
CJNE A,#16,BTBZ2
LCALL ADS
SJMP BTBZ4
BTBZ2:CJNE A,#15,BTBZ0
RET
BTBZ3:LCALL E14
SJMP BTBZ0
BTBZ4:CLR C
MOV A,R1
SUBB A,43H
MOV 54H,A
MOV A,R2
SUBB A,44H
MOV 55H,A
MOV A,R3
SUBB A,45H
MOV 56H,A
JC BTBZ3
MOV A,54H
SUBB A,#20
MOV A,55H
SUBB A,#0
MOV A,56H
SUBB A,#0
JC BTBZ3
BTBZ5:CLR A
MOV R1,A
MOV R2,A
MOV R3,A
LCALL BCD24
CLR 0CH
BTBZ6:LCALL SY
LCALL KA
JB 07H,BTBZ10
JB 08H,BTBZ7
LCALL BTCA
SJMP BTBZ6
BTBZ7:LCALL BTCB
MOV A,R1
JNZ BTBZ8
MOV A,R2
JNZ BTBZ8
MOV A,R3
JNZ BTBZ8
SJMP BTBZ5
BTBZ8:NOP
MOV 3DH,R1
MOV 3EH,R2
MOV 3FH,R3
MOV 3AH,54H
MOV 3BH,55H
MOV 3CH,56H
MOV DPTR,#7F1AH
MOV R0,#3AH
MOV R7,#6
BTBZ9:MOV A,@R0
LCALL WRIT
INC R0
INC DPTR
DJNZ R7,BTBZ9
BTBZ10:RET
BTVX:MOV 2DH,#19H
MOV A,#10H
MOV 2BH,A
MOV 2AH,A
MOV 29H,A
MOV 28H,A
RET
BTVY:LCALL BCD24
MOV R0,#28H
MOV R1,#70H
MOV R7,#3
BTVY1:MOV A,@R1
ANL A,#0FH
MOV @R0,A
INC R0
MOV A,@R1
SWAP A
ANL A,#0FH
MOV @R0,A
INC R0
INC R1
DJNZ R7,BTVY1
RET
BTVU:MOV A,29H
SWAP A
ORL A,28H
MOV R4,A
MOV A,2BH
SWAP A
ORL A,2AH
MOV R5,A
MOV A,2DH
SWAP A
ORL A,2CH
MOV R6,A
LCALL DCB
RET
BTV:NOP
MOV 2EH,#00H
CALL BTVX
MOV 2CH,#1
MOV R7,#200
BTV0:LCALL DL2
DJNZ R7,BTV0
MOV R1,3AH
MOV R2,3BH
MOV R3,3CH
LCALL BTVY
BTV1:LCALL KA
JB 07H,BTV3
JB 08H,BTV2
LCALL X6
SJMP BTV1
BTV2:CALL BTVU
MOV DPTR,#7F1AH
MOV A,R1
MOV 3AH,A
LCALL WRIT
INC DPTR
MOV A,R2
MOV 3BH,A
LCALL WRIT
INC DPTR
MOV A,R3
MOV 3CH,A
LCALL WRIT
BTV3:CALL BTVX
MOV 2CH,#2
MOV R7,#200
BTV4:LCALL DL2
DJNZ R7,BTV4
MOV R1,3DH
MOV R2,3EH
MOV R3,3FH
LCALL BTVY
BTV5:LCALL KA
JB 07H,BTV7
JB 08H,BTV6
LCALL X6
SJMP BTV5
BTV6:CALL BTVU
MOV DPTR,#7F1DH
MOV A,R1
MOV 3DH,A
LCALL WRIT
INC DPTR
MOV A,R2
MOV 3EH,A
LCALL WRIT
INC DPTR
MOV A,R3
MOV 3FH,A
LCALL WRIT
BTV7:RET
BTBS:NOP
MOV 2EH,#04H
CLR 0CH
MOV R1,38H
MOV R2,39H
MOV R3,#0
LCALL BCD24
MOV R0,#70H
MOV A,@R0
ANL A,#0FH
MOV 28H,A
MOV A,@R0
SWAP A
ANL A,#0FH
MOV 29H,A
INC R0
MOV A,@R0
ANL A,#0FH
MOV 2AH,A
MOV A,@R0
SWAP A
ANL A,#0FH
MOV 2BH,A
INC R0
MOV A,@R0
ANL A,#0FH
MOV 2CH,A
MOV 2DH,#10H
BTBS1:LCALL KA
JB 07H,BTBS4
JB 08H,BTBS2
LCALL X5
SJMP BTBS1
BTBS2:MOV A,29H
SWAP A
ORL A,28H
MOV R4,A
MOV A,2BH
SWAP A
ORL A,2AH
MOV R5,A
MOV R6,2CH
LCALL DCB
MOV A,R1
JNZ BTBS3
MOV A,R2
JNZ BTBS3
SJMP BTBS4
BTBS3:MOV DPTR,#7F18H
MOV A,R1
MOV 38H,A
LCALL WRIT
INC DPTR
MOV A,R2
MOV 39H,A
LCALL WRIT
BTBS4:RET

KV:MOV R0,#0AH;保存未经扣率重量以备BEX(判断稳定)用
MOV A,R1
MOVX @R0,A
INC R0
MOV A,R2
MOVX @R0,A

JB 27H,KV4
CLR C;扣率,以直接减加重量的方式
JB 2CH,KV1;加重量标志,此标志在按清除后改变

MOV R0,#26H
MOV A,R1
MOVX @R0,A
INC R0
SUBB A,38H
MOV R1,A
MOV A,R2
MOVX @R0,A

INC R0
SUBB A,39H
MOV R2,A

MOV A,R3
MOVX @R0,A

SUBB A,#0
MOV R3,A
JC KV3
JMP KV4

KV1:MOV A,R1
ADD A,38H
MOV R1,A
MOV A,R2
ADDC A,39H
MOV R2,A
MOV A,R3
ADDC A,#0
MOV R3,A
KV2:JMP KV4
KV3:
MOV R0,#26H
MOVX A,@R0
MOV R1,A
INC R0
MOVX A,@R0
MOV R2,A
INC R0
MOVX A,@R0
MOV R3,A
KV4:MOV 46H,R1
MOV 47H,R2
RET

MM1:CLR 09H
CLR 1EH
CLR 22H
MOV R0,#28H
MOV R7,#6
MOV A,#10H
MM10:MOV @R0,A
INC R0
DJNZ R7,MM10
MM11:LCALL KA
JB 07H,MM12
JB 08H,MM13
JB 2BH,MM11
LCALL X6
SJMP MM11
MM12:CLR A
MOV 38H,A
MOV 39H,A
MOV DPTR,#7F18H
CALL WRIT
INC DPTR
CALL WRIT
RET

MM13:MOV A,2AH;先判断是否两位密码正确,若是,则进入扣率状态
CJNE A,#10H,MM131

MOV DPTR,#7F27H
LCALL READ
MOV R0,A
MOV R1,#29H
MOV A,R0
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM54
DEC R1
MOV A,R0
ANL A,#0FH
XRL A,@R1
JNZ MM54
;SETB 09H
SETB 22H
MM54:RET
MM131:MOV R1,#2DH
MOV A,#5
XRL A,@R1
JNZ MM14
DEC R1
MOV A,#1
XRL A,@R1
JNZ MM14
DEC R1
MOV A,#6
XRL A,@R1
JNZ MM14
DEC R1
MOV A,#4
XRL A,@R1
JNZ MM14
DEC R1
MOV A,#2
XRL A,@R1
JNZ MM14
DEC R1
MOV A,#8
XRL A,@R1
JNZ MM14
SETB 09H
RET
MM14:LCALL TMR
MOV R1,#2DH
MOV A,54H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM15
DEC R1
MOV A,55H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM15
DEC R1
MOV A,56H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM15
DEC R1
MOV A,54H
ANL A,#0FH
XRL A,@R1
JNZ MM15
DEC R1
MOV A,55H
ANL A,#0FH
XRL A,@R1
JNZ MM15
DEC R1
MOV A,56H
ANL A,#0FH
XRL A,@R1
JNZ MM15
SETB 09H
RET
MM15:MOV DPTR,#7F07H
ACALL MMR
MOV R0,#78H
MOV R1,#28H
MOV R7,#6
MM17:MOV A,@R0
XRL A,@R1
JNZ MM18
INC R0
INC R1
DJNZ R7,MM17
SETB 09H
RET
MM18:MOV DPTR,#7F27H
ACALL MMR
MOV R0,#78H
MOV R1,#28H
MOV R7,#6
MM19:MOV A,@R0
XRL A,@R1
JNZ MM1A
INC R0
INC R1
DJNZ R7,MM19
SETB 1EH
RET
MM1A:MOV R1,#2DH
MOV A,#5
XRL A,@R1
JNZ MM1B
DEC R1
MOV A,#0
XRL A,@R1
JNZ MM1B
DEC R1
MOV A,#3
XRL A,@R1
JNZ MM1B
DEC R1
MOV A,#1
XRL A,@R1
JNZ MM1B
DEC R1
MOV A,#2
XRL A,@R1
JNZ MM1B
DEC R1
MOV A,#8
XRL A,@R1
JNZ MM1B
LCALL MMG
RET

MM1B:MOV R1,#2DH
MOV A,#5
XRL A,@R1
JNZ MM1C
DEC R1
MOV A,#7
XRL A,@R1
JNZ MM1C
DEC R1
MOV A,#2
XRL A,@R1
JNZ MM1C
DEC R1
MOV A,#5
XRL A,@R1
JNZ MM1C
DEC R1
MOV A,#7
XRL A,@R1
JNZ MM1C
DEC R1
MOV A,#2
XRL A,@R1
JNZ MM1C
LCALL MMH
MM1C:RET

MMG:MOV DPTR,#7F2AH
LCALL MMRX
MMG1:LCALL KA
JB 07H,MMG7
JB 08H,MMG2
LCALL X6
SJMP MMG1
MMG2:MOV DPTR,#7F2AH
LCALL MMW
MOV DPTR,#7F2DH
LCALL MMRX
MOV 2EH,#15H
MMG3:LCALL KA
JB 07H,MMG7
JB 08H,MMG4
LCALL X6
SJMP MMG3
MMG4:MOV DPTR,#7F2DH
LCALL MMW
MOV 2EH,#00H
MMG7:RET

MMH:MOV DPTR,#7F27H
MOV R0,#28H
LCALL READ
MOV R1,A
ANL A,#0FH
MOV @R0,A
INC R0
MOV A,R1
SWAP A
ANL A,#0FH
MOV @R0,A
MOV R7,#4
MOV A,#10H
MMH0:INC R0
MOV @R0,A
DJNZ R7,MMH0

MMH1:LCALL KA
JB 07H,MMH7
JB 08H,MMH6
LCALL X2
SJMP MMH1
MMH6:MOV DPTR,#7F27H
MOV A,29H
ANL A,#0FH
SWAP A
MOV R1,A
MOV A,28H
ANL A,#0FH
ORL A,R1
LCALL WRIT
MMH7:RET

BT2:NOP
PUSH 27H
PUSH 2EH
MOV 27H,#0
MOV 2EH,#0
ACALL MM2
JB 09H,BT21
BT20:NOP
POP 2EH
POP 27H
RET
BT21:LCALL DSGJ
SJMP BT20
BT3:NOP
PUSH 27H
PUSH 2EH
MOV 27H,#0
MOV 2EH,#0
ACALL MM3
JB 09H,BT31
BT30:NOP
POP 2EH
POP 27H
RET
BT31:LCALL CZCC
SJMP BT30
BT4:NOP
PUSH 27H
PUSH 2EH
MOV 27H,#0
MOV 2EH,#0
ACALL MM4
JB 09H,BT41
BT40:NOP
POP 2EH
POP 27H
RET
BT41:NOP
MOV DPTR,#7F03H
LCALL READ
MOV R1,A
ANL A,#0FH
MOV 28H,A
MOV A,R1
SWAP A
ANL A,#0FH
MOV 29H,A
INC DPTR
LCALL READ
MOV R1,A
ANL A,#0FH
MOV 2AH,A
MOV A,R1
SWAP A
ANL A,#0FH
MOV 2BH,A
JNZ BT42
MOV 2BH,#10H
MOV A,2AH
JNZ BT42
MOV 2AH,#10H
MOV A,29H
JNZ BT42
MOV 29H,#10H
BT42:MOV A,#10H
MOV 2CH,A
MOV 2DH,A
BT43:LCALL KY
CJNE A,#15,BT44
SJMP BT40
BT44:CJNE A,#12,BT43
MOV DPTR,#7F03H
CLR A
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
SJMP BT40
MM2:NOP
CLR 09H
MOV R0,#28H
MOV R7,#6
MOV A,#10H
MM20:MOV @R0,A
INC R0
DJNZ R7,MM20
MM21:LCALL KA
JB 07H,MM22
JB 08H,MM23
LCALL X6
SJMP MM21
MM22:RET
MM23:MOV R1,#2DH
MOV A,#1
XRL A,@R1
JNZ MM24
DEC R1
MOV A,#8
XRL A,@R1
JNZ MM24
DEC R1
MOV A,#7
XRL A,@R1
JNZ MM24
DEC R1
MOV A,#2
XRL A,@R1
JNZ MM24
DEC R1
MOV A,#1
XRL A,@R1
JNZ MM24
DEC R1
MOV A,#6
XRL A,@R1
JNZ MM24
SETB 09H
RET
MM24:LCALL TMR
MOV R1,#2DH
MOV A,54H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM25
DEC R1
MOV A,56H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM25
DEC R1
MOV A,55H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM25
DEC R1
MOV A,56H
ANL A,#0FH
XRL A,@R1
JNZ MM25
DEC R1
MOV A,54H
ANL A,#0FH
XRL A,@R1
JNZ MM25
DEC R1
MOV A,55H
ANL A,#0FH
XRL A,@R1
JNZ MM25
SETB 09H
RET
MM25:MOV DPTR,#7F0AH
ACALL MMR
MOV R0,#78H
MOV R1,#28H
MOV R7,#6
MM27:MOV A,@R0
XRL A,@R1
JNZ MM28
INC R0
INC R1
DJNZ R7,MM27
SETB 09H
MM28:RET
MM3:NOP
CLR 09H
MOV R0,#28H
MOV R7,#6
MOV A,#10H
MM30:MOV @R0,A
INC R0
DJNZ R7,MM30
MM31:LCALL KA
JB 07H,MM32
JB 08H,MM33
LCALL X6
SJMP MM31
MM32:RET
MM33:MOV R1,#2DH
MOV A,#4
XRL A,@R1
JNZ MM34
DEC R1
MOV A,#9
XRL A,@R1
JNZ MM34
DEC R1
MOV A,#5
XRL A,@R1
JNZ MM34
DEC R1
MOV A,#7
XRL A,@R1
JNZ MM34
DEC R1
MOV A,#7
XRL A,@R1
JNZ MM34
DEC R1
MOV A,#6
XRL A,@R1
JNZ MM34
SETB 09H
RET
MM34:LCALL TMR
MOV R1,#2DH
MOV A,54H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM35
DEC R1
MOV A,55H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM35
DEC R1
MOV A,56H
SWAP A
ANL A,#0FH
XRL A,@R1
JNZ MM35
DEC R1
MOV A,56H
ANL A,#0FH
XRL A,@R1
JNZ MM35
DEC R1
MOV A,55H
ANL A,#0FH
XRL A,@R1
JNZ MM35
DEC R1
MOV A,54H
ANL A,#0FH
XRL A,@R1
JNZ MM35
SETB 09H
RET
MM35:MOV DPTR,#7F0DH
ACALL MMR
MOV R0,#78H
MOV R1,#28H
MOV R7,#6
MM37:MOV A,@R0
XRL A,@R1
JNZ MM38
INC R0
INC R1
DJNZ R7,MM37
SETB 09H
MM38:RET
MM4:NOP
CLR 09H
MOV R0,#28H
MOV R7,#6
MOV A,#10H
MM40:MOV @R0,A
INC R0
DJNZ R7,MM40
MM41:LCALL KA
JB 07H,MM42
JB 08H,MM43
LCALL X4
SJMP MM41
MM42:RET
MM43:MOV R1,#2BH
MOV A,#2
XRL A,@R1
JNZ MM44
DEC R1
MOV A,#0
XRL A,@R1
JNZ MM44
DEC R1
MOV A,#0
XRL A,@R1
JNZ MM44
DEC R1
MOV A,#0
XRL A,@R1
JNZ MM44
SETB 09H
MM44:RET
MMR:NOP
MOV R0,#78H
MMR0:MOV R7,#3
MMR1:LCALL READ
MOV R1,A
ANL A,#0FH
MOV @R0,A
INC R0
MOV A,R1
SWAP A
ANL A,#0FH
MOV @R0,A
INC R0
INC DPTR
DJNZ R7,MMR1
RET
MMRX:NOP
MOV R0,#28H
ACALL MMR0
RET
MMW:MOV R0,#78H
ACALL DSC
MOV R0,#78H
MOV R7,#3
MMW1:MOV A,@R0
LCALL WRIT
INC R0
INC DPTR
DJNZ R7,MMW1
RET
DSR:PUSH 07H
MOV R0,#78H
MOV R7,#6
DSR1:LCALL READ
MOV @R0,A
INC R0
INC DPTR
DJNZ R7,DSR1
POP 07H
RET
DSW:PUSH 07H
MOV R0,#78H
MOV R7,#6
DSW1:MOV A,@R0
LCALL WRIT
INC R0
INC DPTR
DJNZ R7,DSW1
POP 07H
RET
DSA:MOV 28H,#10H
MOV 29H,#10H
MOV 2AH,#10H
MOV 2CH,#02H
MOV 2DH,#0FH
MOV 2EH,#10H
RET
DSB:MOV R1,#28H
MOV R7,#3
DSB1:MOV A,@R0
ANL A,#0FH
MOV @R1,A
INC R1
MOV A,@R0
SWAP A
ANL A,#0FH
MOV @R1,A
INC R0
INC R1
DJNZ R7,DSB1
RET
DSC:MOV R1,#28H
MOV R7,#3
DSC1:INC R1
MOV A,@R1
SWAP A
DEC R1
ORL A,@R1
MOV @R0,A
INC R0
INC R1
INC R1
DJNZ R7,DSC1
RET
DSD:ACALL DSA
DSD0:LCALL KY
JZ DSD0
CJNE A,#15,DSD1
SJMP DSD7
DSD1:CJNE A,#16,DSD0
MOV 2EH,#15H
MOV DPH,#7FH
MOV DPL,7EH
ACALL DSR
MOV R0,#78H
ACALL DSB
DSD3:LCALL KA
JB 07H,DSD7
JB 08H,DSD4
LCALL X6
SJMP DSD3
DSD4:MOV R0,#78H
ACALL DSC
MOV 2EH,#00H
MOV R0,#7BH
ACALL DSB
DSD5:LCALL KA
JB 07H,DSD7
JB 08H,DSD6
LCALL X6
SJMP DSD5
DSD6:MOV R0,#7BH
ACALL DSC
MOV DPH,#7FH
MOV DPL,7EH
ACALL DSW
DSD7:RET
DSGJ:NOP
MOV 28H,#10H
MOV 29H,#10H
MOV 2AH,#0EH
MOV 2BH,#1AH
MOV 2CH,#0AH
MOV 2DH,#0DH
DS0:LCALL KY
CJNE A,#15,DS1
SJMP DS4
DS1:CJNE A,#16,DS0
LCALL DTX
DS2:LCALL KA
JB 07H,DS4
JB 08H,DS3
LCALL X6
SJMP DS2
DS3:MOV A,2DH
SWAP A
ORL A,2CH
MOV 54H,A
MOV A,2BH
SWAP A
ORL A,2AH
MOV 55H,A
MOV A,29H
SWAP A
ORL A,28H
MOV 56H,A
LCALL TMW
DS4:MOV A,#10H
MOV 28H,A
MOV 29H,A
MOV 2AH,A
MOV 2BH,A
MOV 2CH,#02H
MOV 2DH,#0FH
MOV 2EH,#00H
DS5:LCALL KY
CJNE A,#15,DS6
SJMP DS9
DS6:CJNE A,#16,DS5
MOV DPTR,#7F0AH
ACALL MMRX
DS7:LCALL KA
JB 07H,DS9
JB 08H,DS8
LCALL X6
SJMP DS7
DS8:MOV DPTR,#7F0AH
ACALL MMW
DS9:MOV 2BH,#01H
MOV 7EH,#40H
ACALL DSD
MOV 2BH,#02H
MOV 7EH,#48H
ACALL DSD
MOV 2BH,#03H
MOV 7EH,#50H
ACALL DSD
RET
CZA:MOV 28H,#10H
MOV 29H,#10H
MOV 2AH,#10H
MOV 2CH,#03H
MOV 2DH,#0FH
MOV 2EH,#10H
RET
CZB:NOP
ACALL CZA
CZB0:LCALL KY
JZ CZB0
CJNE A,#15,CZB1
SJMP CZB4
CZB1:CJNE A,#16,CZB0
MOV 2EH,#15H
ACALL DSR
MOV R0,#78H
ACALL DSB
CZB2:LCALL KY
JZ CZB2
CJNE A,#15,CZB3
SJMP CZB4
CZB3:CJNE A,#16,CZB2
MOV R1,7BH
MOV R2,7CH
MOV R3,7DH
LCALL BCD24
MOV 2EH,7FH
LCALL YY1
CZB4:RET
YY1:LCALL SY
YY10:LCALL KY
CJNE A,#15,YY11
RET
YY11:CJNE A,#16,YY10
RET
CZCC:NOP
MOV A,#10H
MOV 28H,A
MOV 29H,A
MOV 2AH,A
MOV 2BH,A
MOV 2CH,#03H
MOV 2DH,#0FH
CZ0:LCALL KY
CJNE A,#15,CZ1
SJMP CZ6
CZ1:CJNE A,#12,CZ3
MOV 28H,#10H
MOV 29H,#11H
MOV 2AH,#15H
MOV 2BH,#0CH
MOV 2CH,#11H
MOV 2DH,#10H
MOV DPTR,#7F60H
MOV R7,#40
CZ2:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,CZ2
SJMP CZCC
CZ3:CJNE A,#16,CZ0
MOV DPTR,#7F0DH
ACALL MMRX
CZ4:LCALL KA
JB 07H,CZ6
JB 08H,CZ5
LCALL X6
SJMP CZ4
CZ5:MOV DPTR,#7F0DH
ACALL MMW
CZ6:NOP
MOV 2BH,#01H
MOV DPTR,#7F60H
ACALL CZB
MOV 2BH,#02H
MOV DPTR,#7F68H
ACALL CZB
MOV 2BH,#03H
MOV DPTR,#7F70H
ACALL CZB
MOV 2BH,#04H
MOV DPTR,#7F78H
ACALL CZB
MOV 2BH,#05H
MOV DPTR,#7F80H
ACALL CZB
RET
GJPD:LCALL TMR
MOV DPTR,#7F40H
LCALL DSR
MOV A,78H
JNZ GJ0
MOV A,79H
JNZ GJ0
MOV A,7AH
JNZ GJ0
SJMP GJ2
GJ0:CLR C
MOV A,56H
SUBB A,78H
MOV A,55H
SUBB A,79H
MOV A,54H
SUBB A,7AH
JNC GJ1
RET
GJ1:CLR A
MOV 27H,A
MOV 28H,#10H
MOV 29H,#18H
MOV 2AH,#15H
MOV 2BH,#0EH
MOV 2CH,#13H
MOV 2DH,#10H
MOV 2EH,A
LCALL KY
CJNE A,#14,GJ11
LCALL DTX
MOV R7,#200
GJ10:LCALL DL2
DJNZ R7,GJ10
SJMP GJ1
GJ11:CJNE A,#16,GJ1
LCALL BH
SJMP GJ1
GJ2:MOV DPTR,#7F48H
LCALL DSR
MOV A,78H
JNZ GJ3
MOV A,79H
JNZ GJ3
MOV A,7AH
JNZ GJ3
SJMP GJ4
GJ3:CLR C
MOV A,56H
SUBB A,78H
MOV A,55H
SUBB A,79H
MOV A,54H
SUBB A,7AH
JNC GJ1
RET
GJ4:MOV DPTR,#7F50H
LCALL DSR
MOV A,78H
JNZ GJ5
MOV A,79H
JNZ GJ5
MOV A,7AH
JNZ GJ5
RET
GJ5:CLR C
MOV A,56H
SUBB A,78H
MOV A,55H
SUBB A,79H
MOV A,54H
SUBB A,7AH
JNC GJ1
RET
CLGJ:NOP
PUSH 27H
PUSH 2EH
MOV 27H,#00H
MOV 2EH,#00H
MOV A,#10H
MOV 28H,A
MOV 29H,A
MOV 2AH,A
MOV 2BH,A
MOV 2CH,A
MOV 2DH,A
CG0:LCALL KA
JB 07H,CG3
JB 08H,CG1
LCALL X6
SJMP CG0
CG1:MOV A,29H
SWAP A
ORL A,28H
MOV 70H,A
MOV A,2BH
SWAP A
ORL A,2AH
MOV 71H,A
MOV A,2DH
SWAP A
ORL A,2CH
MOV 72H,A
MOV DPTR,#7F40H
LCALL DSR
MOV A,7BH
CJNE A,70H,CG4
MOV A,7CH
CJNE A,71H,CG4
MOV A,7DH
CJNE A,72H,CG4
MOV DPTR,#7F40H
MOV R7,#8
CG2:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,CG2
CG3:NOP
POP 2EH
POP 27H
RET
CG4:MOV DPTR,#7F48H
LCALL DSR
MOV A,7BH
CJNE A,70H,CG6
MOV A,7CH
CJNE A,71H,CG6
MOV A,7DH
CJNE A,72H,CG6
MOV DPTR,#7F40H
MOV R7,#16
CG5:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,CG5
SJMP CG3
CG6:MOV DPTR,#7F50H
LCALL DSR
MOV A,7BH
CJNE A,70H,CG3
MOV A,7CH
CJNE A,71H,CG3
MOV A,7DH
CJNE A,72H,CG3
MOV DPTR,#7F40H
MOV R7,#24
CG7:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,CG7
SJMP CG3
BTC:NOP
MOV A,#10H
MOV 28H,A
MOV 29H,A
MOV 2AH,A
MOV 2BH,A
MOV 2CH,#01H
MOV 2DH,#0FH
BC0:LCALL KY
CJNE A,#15,BC1
SJMP BC4
BC1:CJNE A,#16,BC0
MOV DPTR,#7F07H
LCALL MMRX
BC2:LCALL KA
JB 07H,BC4
JB 08H,BC3
LCALL X6
SJMP BC2
BC3:MOV DPTR,#7F07H
LCALL MMW
BC4:NOP
LCALL BTC1
LCALL BTC2
LCALL BTC3
LCALL BTC5
LCALL BTC6
LCALL BTC7
LCALL BTC8
LCALL BTC9
RET
BTC1:NOP
MOV R1,30H
LCALL BCD8
MOV A,R2
ANL A,#0FH
MOV 28H,A
MOV A,R2
SWAP A
ANL A,#0FH
MOV 29H,A
MOV A,#10H
MOV 2AH,A
MOV 2BH,A
MOV 2CH,A
MOV 2DH,#0DH
BTC10:LCALL KA
JB 07H,BTC18
JB 08H,BTC11
LCALL X2
SJMP BTC10
BTC11:MOV A,29H
SWAP A
ORL A,28H
MOV R2,A
CJNE R2,#01H,BTC12
MOV A,#1
SJMP BTC17
BTC12:CJNE R2,#02H,BTC13
MOV A,#2
SJMP BTC17
BTC13:CJNE R2,#05H,BTC14
MOV A,#5
SJMP BTC17
BTC14:CJNE R2,#10H,BTC15
MOV A,#10
SJMP BTC17
BTC15:CJNE R2,#20H,BTC16
MOV A,#20
SJMP BTC17
BTC16:CJNE R2,#50H,BTC10
MOV A,#50
BTC17:MOV 30H,A
MOV DPTR,#7F10H
LCALL WRIT
BTC18:RET
BTC2:NOP
MOV 28H,31H
MOV A,#10H
MOV 29H,A
MOV 2AH,A
MOV 2BH,A
MOV 2CH,#0CH
MOV 2DH,#0DH
BTC20:LCALL KA
JB 07H,BTC27
JB 08H,BTC21
MOV 28H,A
SJMP BTC20
BTC21:MOV A,28H
JNZ BTC22
MOV 2EH,#00H
SJMP BTC26
BTC22:CJNE A,#1,BTC23
MOV 2EH,#02H
SJMP BTC26
BTC23:CJNE A,#2,BTC24
MOV 2EH,#04H
SJMP BTC26
BTC24:CJNE A,#3,BTC25
MOV 2EH,#08H
SJMP BTC26
BTC25:CJNE A,#4,BTC20
MOV 2EH,#10H
BTC26:MOV 31H,A
MOV DPTR,#7F11H
LCALL WRIT
BTC27:RET
BTCA:PUSH ACC
MOV R7,#4
BTCA1:CLR C
MOV R0,#70H
MOV A,@R0
RLC A
MOV @R0,A
INC R0
MOV A,@R0
RLC A
MOV @R0,A
INC R0
MOV A,@R0
RLC A
MOV @R0,A
DJNZ R7,BTCA1
POP ACC
ORL A,70H
MOV 70H,A
RET
BTCB:NOP
MOV R4,70H
MOV R5,71H
MOV R6,72H
LCALL DCB
RET
BTC3:NOP
MOV R1,32H
MOV R2,33H
MOV R3,34H
LCALL BCD24
CLR 0CH
BTC30:LCALL SY
LCALL KA
JB 07H,BTC32
JB 08H,BTC31
LCALL BTCA
SJMP BTC30
BTC31:LCALL BTCB
MOV DPTR,#7F12H
MOV A,R1
MOV 32H,A
LCALL WRIT
INC DPTR
MOV A,R2
MOV 33H,A
LCALL WRIT
INC DPTR
MOV A,R3
MOV 34H,A
LCALL WRIT
BTC32:RET
BTC4:NOP
MOV A,35H
SWAP A
ANL A,#0FH
MOV 28H,A
MOV 29H,#10H
MOV 2AH,#10H
MOV 2BH,#1AH
MOV 2CH,#15H
MOV 2DH,#0FH
MOV 2EH,#00H
BTC40:LCALL KA
JB 07H,BTC45
JB 08H,BTC41
MOV 28H,A
SJMP BTC40
BTC41:MOV A,28H
CJNE A,#1,BTC42
SJMP BTC44
BTC42:CJNE A,#2,BTC43
SJMP BTC44
BTC43:CJNE A,#3,BTC40
BTC44:MOV A,28H
SWAP A
MOV R1,A
MOV A,35H
ANL A,#0FH
ORL A,R1
MOV 35H,A
MOV DPTR,#7F15H
LCALL WRIT
BTC45:RET
BTC5:NOP
MOV A,35H
ANL A,#0FH
MOV 28H,A
MOV 29H,#10H
MOV 2AH,#10H
MOV 2BH,#01H
MOV 2CH,#01H
MOV 2DH,#0FH
MOV 2EH,#10H
BTC50:LCALL KA
JB 07H,BTC58
JB 08H,BTC51
MOV 28H,A
SJMP BTC50
BTC51:MOV A,28H
JZ BTC57
CJNE A,#1,BTC52
SJMP BTC57
BTC52:CJNE A,#2,BTC53
SJMP BTC57
BTC53:CJNE A,#3,BTC54
SJMP BTC57
BTC54:CJNE A,#4,BTC55
SJMP BTC57
BTC55:CJNE A,#5,BTC56
SJMP BTC57
BTC56:CJNE A,#6,BTC50
BTC57:MOV A,35H
ANL A,#0F0H
ORL A,28H
MOV 35H,A
MOV DPTR,#7F15H
LCALL WRIT
BTC58:RET
BTC6:NOP
NOP
MOV A,36H
SWAP A
ANL A,#0FH
MOV 28H,A
MOV 29H,#10H
MOV 2AH,#10H
MOV 2BH,#02H
MOV 2CH,#01H
MOV 2DH,#0FH
MOV 2EH,#10H
BTC60:LCALL KA
JB 07H,BTC67
JB 08H,BTC61
MOV 28H,A
SJMP BTC60
BTC61:MOV A,28H
JZ BTC66
CJNE A,#1,BTC62
SJMP BTC66
BTC62:CJNE A,#2,BTC63
SJMP BTC66
BTC63:CJNE A,#3,BTC64
SJMP BTC66
BTC64:CJNE A,#4,BTC65
SJMP BTC66
BTC65:CJNE A,#5,BTC60
BTC66:MOV A,28H
SWAP A
MOV R1,A
MOV A,36H
ANL A,#0FH
ORL A,R1
MOV 36H,A
MOV DPTR,#7F16H
LCALL WRIT
BTC67:RET
BTC7:NOP
NOP
MOV A,36H
ANL A,#0FH
MOV 28H,A
MOV 29H,#10H
MOV 2AH,#10H
MOV 2BH,#03H
MOV 2CH,#01H
MOV 2DH,#0FH
MOV 2EH,#10H
BTC70:LCALL KA
JB 07H,BTC77
JB 08H,BTC71
MOV 28H,A
SJMP BTC70
BTC71:MOV A,28H
JZ BTC76
CJNE A,#1,BTC72
SJMP BTC76
BTC72:CJNE A,#2,BTC73
SJMP BTC76
BTC73:CJNE A,#3,BTC74
SJMP BTC76
BTC74:CJNE A,#4,BTC75
SJMP BTC76
BTC75:CJNE A,#5,BTC70
BTC76:MOV A,36H
ANL A,#0F0H
ORL A,28H
MOV 36H,A
MOV DPTR,#7F16H
LCALL WRIT
BTC77:RET
BTC8:NOP
NOP
MOV A,37H
SWAP A
ANL A,#0FH
MOV 28H,A
MOV 29H,#10H
MOV 2AH,#10H
MOV 2BH,#04H
MOV 2CH,#01H
MOV 2DH,#0FH
MOV 2EH,#10H
BTC80:LCALL KA
JB 07H,BTC83
JB 08H,BTC81
MOV 28H,A
SJMP BTC80
BTC81:MOV A,28H
JZ BTC82
CJNE A,#1,BTC80
BTC82:MOV A,28H
SWAP A
MOV R1,A
MOV A,37H
ANL A,#0FH
ORL A,R1
MOV 37H,A
MOV DPTR,#7F17H
LCALL WRIT
BTC83:RET
BTC9:NOP
NOP
MOV A,37H
ANL A,#0FH
MOV 28H,A
MOV 29H,#10H
MOV 2AH,#10H
MOV 2BH,#05H
MOV 2CH,#01H
MOV 2DH,#0FH
MOV 2EH,#10H
BTC90:LCALL KA
JB 07H,BTC94
JB 08H,BTC91
MOV 28H,A
SJMP BTC90
BTC91:MOV A,28H
BTC92:CJNE A,#9,BTC93
SJMP BTC90
BTC93:MOV A,37H
ANL A,#0F0H
ORL A,28H
MOV 37H,A
MOV DPTR,#7F17H
LCALL WRIT
BTC94:RET
BTZ:MOV DPTR,#7F18H
;MOV A,#10H
MOV A,#0
;MOV 38H,A;进入标定后扣率不取消
;LCALL WRIT
INC DPTR
MOV A,#0
;MOV A,#27H
;MOV 39H,A
;LCALL WRIT
BTZ0:JNB 04H,BTZ1
CLR 04H
LCALL ADX
LCALL BCD24
CLR 0CH
LCALL SY
BTZ1:LCALL KY
CJNE A,#15,BTZ2
SJMP BTZ3
BTZ2:CJNE A,#16,BTZ0
LCALL ADS
MOV DPTR,#7F20H
MOV A,R1
MOV 40H,A
MOV 43H,A
LCALL WRIT
INC DPTR
MOV A,R2
MOV 41H,A
MOV 44H,A
LCALL WRIT
INC DPTR
MOV A,R3
MOV 42H,A
MOV 45H,A
LCALL WRIT
BTZ3:MOV 2EH,7FH
BTZ4:JNB 04H,BTZ5
CLR 04H
LCALL SU
MOV R4,30H
LCALL DV1
LCALL CPB
LCALL BEX
MOV R4,30H
LCALL MU1
LCALL BCD24
LCALL SY
BTZ5:LCALL KY
CJNE A,#16,BTZ6
LCALL ADS
SJMP BTZ7
BTZ6:CJNE A,#15,BTZ4
RET
BTZ6A:LCALL E14
SJMP BTZ4
BTZ7:CLR C
MOV A,R1
SUBB A,43H
MOV 54H,A
MOV A,R2
SUBB A,44H
MOV 55H,A
MOV A,R3
SUBB A,45H
MOV 56H,A
JC BTZ6A
MOV A,54H
SUBB A,#20
MOV A,55H
SUBB A,#0
MOV A,56H
SUBB A,#0
JC BTZ6A
BTZ8:CLR A
MOV R1,A
MOV R2,A
MOV R3,A
LCALL BCD24
CLR 0CH
BTZ9:LCALL SY
LCALL KA
JB 07H,BTZ13
JB 08H,BTZ10
LCALL BTCA
SJMP BTZ9
BTZ10:LCALL BTCB
MOV A,R1
JNZ BTZ11
MOV A,R2
JNZ BTZ11
MOV A,R3
JNZ BTZ11
SJMP BTZ8
BTZ11:NOP
MOV 3DH,R1
MOV 3EH,R2
MOV 3FH,R3
MOV 3AH,54H
MOV 3BH,55H
MOV 3CH,56H
MOV DPTR,#7F1AH
MOV R0,#3AH
MOV R7,#6
BTZ12:MOV A,@R0
LCALL WRIT
INC R0
INC DPTR
DJNZ R7,BTZ12
BTZ13:RET
KA:NOP
CLR 07H
CLR 08H
CLR 2BH
LCALL KY
JZ KA
CJNE A,#8,KA0
CLR A
RET
KA0:CJNE A,#1,KA1
MOV A,#1
RET
KA1:CJNE A,#5,KA2
MOV A,#2
RET
KA2:CJNE A,#9,KA3
MOV A,#3
RET
KA3:CJNE A,#2,KA4
MOV A,#4
RET
KA4:CJNE A,#6,KA5
MOV A,#5
RET
KA5:CJNE A,#10,KA6
MOV A,#6
RET
KA6:CJNE A,#3,KA7
MOV A,#7
RET
KA7:CJNE A,#7,KA8
MOV A,#8
RET
KA8:CJNE A,#11,KA9
MOV A,#9
RET
KA9:CJNE A,#15,KA10
SETB 07H
RET
KA10:CJNE A,#16,KA11
SETB 08H
RET
KA11:CJNE A,#12,KA
SETB 2BH
RET
BBJ:NOP
JB 0CH,BBJ0
JB 1AH,BBJ0
JNB 0EH,BBJ0
SJMP BBJ1
BBJ0:RET
BBJ1:NOP
PUSH 01H
PUSH 02H
PUSH 03H
MOV R4,30H
LCALL MU1
CLR C
MOV A,#0F4H
SUBB A,R1
MOV A,#01H
SUBB A,R2
CLR A
SUBB A,R3
JNC BBJ2
SETB 1AH
MOV DPTR,#7F03H
LCALL READ
MOV R1,A
INC DPTR
LCALL READ
MOV R2,A
MOV A,R1
ADD A,#1
DA A
MOV R1,A
MOV A,R2
ADDC A,#0
DA A
MOV R2,A
MOV DPTR,#7F03H
MOV A,R1
LCALL WRIT
INC DPTR
MOV A,R2
LCALL WRIT
BBJ2:POP 03H
POP 02H
POP 01H
RET
BBJJ:NOP
JB 19H,BJ0
JB 0CH,BJ0
JB 0DH,BJ0
JNB 0EH,BJ0
SJMP BJ1
BJ0:RET
BJ1:NOP
PUSH 01H
PUSH 02H
PUSH 03H
SETB 19H
MOV R4,30H
LCALL MU1
CLR C
MOV A,67H
SUBB A,R1
MOV A,68H
SUBB A,R2
MOV A,69H
SUBB A,R3
JNC BJX
MOV 75H,R1
MOV 76H,R2
MOV 77H,R3
MOV DPTR,#7F68H
LCALL DSR
ACALL BJC
JC BJ2
ACALL BJB
MOV DPTR,#7F60H
LCALL DSW
MOV 67H,75H
MOV 68H,76H
MOV 69H,77H
SJMP BJX
BJ2:MOV DPTR,#7F60H
LCALL DSW
MOV 67H,7BH
MOV 68H,7CH
MOV 69H,7DH
MOV DPTR,#7F70H
LCALL DSR
ACALL BJC
JC BJ3
ACALL BJB
MOV DPTR,#7F68H
LCALL DSW
BJX:NOP
POP 03H
POP 02H
POP 01H
RET
BJ3:MOV DPTR,#7F68H
LCALL DSW
MOV DPTR,#7F78H
LCALL DSR
ACALL BJC
JC BJ4
ACALL BJB
MOV DPTR,#7F70H
LCALL DSW
SJMP BJX
BJ4:MOV DPTR,#7F70H
LCALL DSW
MOV DPTR,#7F80H
LCALL DSR
ACALL BJC
JC BJ5
ACALL BJB
MOV DPTR,#7F78H
LCALL DSW
SJMP BJX
BJ5:MOV DPTR,#7F78H
LCALL DSW
ACALL BJB
MOV DPTR,#7F80H
LCALL DSW
SJMP BJX
BJB:LCALL TMR
MOV 78H,56H
MOV 79H,55H
MOV 7AH,54H
MOV 7BH,75H
MOV 7CH,76H
MOV 7DH,77H
RET
BJC:CLR C
MOV A,7BH
SUBB A,75H
MOV A,7CH
SUBB A,76H
MOV A,7DH
SUBB A,77H
RET
SC:JB 04H,SC0
RET
SC0:NOP
CLR 04H
CLR 11H
LCALL SU
MOV R4,30H
LCALL DV1
LCALL ZR
LCALL CPB

LCALL BEX
LCALL KV;乘以扣率

LCALL BBJ
LCALL BBJJ
LCALL CZZ
JB 0FH,SC4
JNB 15H,SC2;有皮重标志
JNB 0CH,SC1
CLR 0CH
LCALL CPA
SC1:CLR C
MOV A,R1
SUBB A,6CH
MOV R1,A
MOV A,R2
SUBB A,6DH

MOV R2,A
MOV A,R3
SUBB A,#0
MOV R3,A
JNB ACC.7,SC2
SETB 0CH
LCALL CPA
SC2:MOV R4,30H
LCALL MU1
LCALL BCD24
LCALL SY
SC3:LCALL SK
RET
SC4:MOV A,#11H
MOV R0,#28H
MOV R7,#6
SC5:MOV @R0,A
INC R0
DJNZ R7,SC5
SJMP SC3

CPA:CLR C
MOV A,R1
CPL A
ADD A,#1
MOV R1,A
MOV A,R2
CPL A
ADDC A,#0
MOV R2,A
MOV A,R3
CPL A
ADDC A,#0
MOV R3,A
RET
CPB:CLR C
MOV A,R3
RRC A
MOV R3,A
MOV A,R2
RRC A
MOV R2,A
MOV A,R1
RRC A
MOV R1,A
JNC CPB1
MOV A,R1
ADD A,#1
MOV R1,A
MOV A,R2
ADDC A,#0
MOV R2,A
MOV A,R3
ADDC A,#0
MOV R3,A
CPB1:RET
SY:JB 1CH,SY8
JB 1DH,SY9
NOP
MOV R0,#70H
MOV R1,#78H
MOV R7,#3
SY0:MOV A,@R0
ANL A,#0FH
MOV @R1,A
INC R1
MOV A,@R0
SWAP A
ANL A,#0FH
MOV @R1,A
INC R0
INC R1
DJNZ R7,SY0
MOV R0,#7DH
MOV A,2EH
JNZ SY1
MOV R7,#5
SJMP SY5
SY1:CJNE A,#02H,SY2
MOV R7,#4
SJMP SY5
SY2:CJNE A,#04H,SY3
MOV R7,#3
SJMP SY5
SY3:CJNE A,#08H,SY4
MOV R7,#2
SJMP SY5
SY4:CJNE A,#10H,SY5
MOV R7,#1
SY5:MOV A,@R0
JNZ SY6
MOV @R0,#10H
DEC R0
DJNZ R7,SY5
SY6:JNB 0CH,SY7
INC R0
MOV @R0,#11H
SY7:NOP
MOV 28H,78H
MOV 29H,79H
MOV 2AH,7AH
MOV 2BH,7BH
MOV 2CH,7CH
MOV 2DH,7DH
RET
SY8:CLR 1CH
RET
SY9:CLR 1DH
RET
ZR:MOV A,35H
ANL A,#0FH
JNZ ZR1
RET
ZR1:MOV A,R3
JNZ ZR3
MOV A,R2
JNZ ZR3
CLR C
MOV A,35H
ANL A,#0FH
SUBB A,R1
JC ZR3
MOV A,48H
DEC A
JZ ZR2
MOV 48H,A
CLR A
MOV R1,A
RET
ZR2:ACALL ZERO
CLR A
MOV R1,A
ZR3:MOV 48H,#20
RET

ZD:CLR C;判断是否小于5d
MOV A,R1
SUBB A,#1
MOV A,R2
SUBB A,#0
JC ZD1
JNB 2AH,ZD00;小于扣率范围扣率不起作用选项F1.6=0,
ZD0:CLR C
MOV R0,#32H;与扣率范围进行比较
MOVX A,@R0
MOV B,A
MOV A,R1
SUBB A,B
INC R0
MOVX A,@R0
MOV B,A
MOV A,R2
SUBB A,B
JC ZD1
ZD00:CLR 27H
RET
ZD1:SETB 27H;小于范围,则27H=1
RET

BEX:;MOV A,R1
;CJNE A,46H,BE1
;MOV A,R2
;CJNE A,47H,BE1
MOV R0,#0AH
MOVX A,@R0
CJNE A,01H,BE1
INC R0
MOVX A,@R0
CJNE A,02H,BE1

ORL 27H,#04H
CLR 0DH
CALL ZD

SJMP BE2
BE1:MOV 46H,R1
MOV 47H,R2
ANL 27H,#0FBH
SETB 0DH
BE2:MOV A,R1
JNZ BE3
MOV A,R2
JNZ BE3
CLR 0CH
CLR 0EH
CLR 19H
CLR 1AH
ORL 27H,#40H
RET
BE3:SETB 0EH
ANL 27H,#0BFH
RET
CZX:MOV R1,32H
MOV R2,33H
MOV R3,34H
MOV R4,30H
LCALL DV1
MOV R0,#4DH
MOV A,R1
ADD A,#9
MOV @R0,A
INC R0
MOV A,R2
ADDC A,#0
MOV @R0,A
INC R0
MOV A,R3
ADDC A,#0
MOV @R0,A
RET
CZZ:CLR 0FH
JB 0CH,CZZ0
CLR C
MOV A,4DH
SUBB A,R1
MOV A,4EH
SUBB A,R2
MOV A,4FH
SUBB A,R3
JNC CZZ0
SETB 0FH

CZZ0:RET
QP:JB 15H,QP0
JB 0CH,QP2
QP0:CPL 15H
JB 15H,QP1
ANL 27H,#0F7H
RET
QP1:ORL 27H,#08H
MOV 6CH,46H
MOV 6DH,47H
QP2:RET
KZ:MOV 43H,40H
MOV 44H,41H
MOV 45H,42H
MOV A,36H
SWAP A
ACALL ZZZ
RET
ZZ:MOV A,36H
ACALL ZZZ
RET
ZZZ:ANL A,#0FH
JNZ ZZ0
MOV 43H,40H
MOV 44H,41H
MOV 45H,42H
RET
ZZ0:CJNE A,#1,ZZ1
MOV 7FH,#4
CALL ZZX
RET
ZZ1:CJNE A,#2,ZZ2
MOV 7FH,#8
CALL ZZX
RET
ZZ2:CJNE A,#3,ZZ3
MOV 7FH,#40
CALL ZZX
RET
ZZ3:CJNE A,#4,ZZ4
MOV 7FH,#100
CALL ZZX
RET
ZZ4:ACALL ZERO
RET
ZERO:PUSH 01H
PUSH 02H
PUSH 03H
LCALL ADS
MOV 43H,R1
MOV 44H,R2
MOV 45H,R3
POP 03H
POP 02H
POP 01H
RET
ZZZZ:LCALL ADS
CLR 0CH
CLR C
MOV A,R1
SUBB A,40H
MOV R1,A
MOV A,R2
SUBB A,41H
MOV R2,A
MOV A,R3
SUBB A,42H
MOV R3,A
JNC ZZZ0
LCALL CPA
SETB 0CH
ZZZ0:MOV R4,3DH
MOV R5,3EH
MOV R6,3FH
LCALL MU3
MOV R0,#70H
MOV R7,#5
CLR C
ZZZ1:MOV A,@R0
RLC A
MOV @R0,A
INC R0
DJNZ R7,ZZZ1
MOV 79H,3AH
MOV 7AH,3BH
MOV 7BH,3CH
LCALL DV3
MOV R4,30H
LCALL DV1
RET
ZZX:CALL ZZZZ
PUSH 01H
PUSH 02H
PUSH 03H
MOV R1,32H
MOV R2,33H
MOV R3,34H
MOV R4,30H
LCALL DV1
MOV R4,7FH
LCALL MU1
MOV R4,#100
LCALL DV1
POP 06H
POP 05H
POP 04H
CLR C
MOV A,R1
SUBB A,R4
MOV A,R2
SUBB A,R5
MOV A,R3
SUBB A,R6
JC ZZX1
CALL ZERO
ZZX1:RET
DTX:MOV 2EH,#15H
LCALL TMR
MOV R0,#56H
MOV R1,#28H
MOV R7,#3
DTX0:MOV A,@R0
ANL A,#0FH
MOV @R1,A
INC R1
MOV A,@R0
SWAP A
ANL A,#0FH
MOV @R1,A
DEC R0
INC R1
DJNZ R7,DTX0
RET
DATE:NOP
PUSH 27H
PUSH 2EH
ANL 27H,#32H
CALL DTX
DATE1:LCALL KY
CJNE A,#14,DATE1
POP 2EH
POP 27H
RET
TIME:NOP
PUSH 27H
PUSH 2EH
ANL 27H,#32H
MOV 2DH,#10H
MOV 2EH,#00H
TM0:LCALL TMR
MOV A,58H
ANL A,#0FH
MOV 28H,A
MOV A,58H
SWAP A
ANL A,#0FH
MOV 29H,A
MOV 2AH,#12H
MOV A,57H
ANL A,#0FH
MOV 2BH,A
MOV A,57H
SWAP A
ANL A,#0FH
MOV 2CH,A
LCALL KY
JZ TM0
CJNE A,#14,TM2
TM1:POP 2EH
POP 27H
RET
TM2:CJNE A,#15,TM3
SJMP TM1
TM3:CJNE A,#16,TM0
TM4:LCALL KA
JB 07H,TM6
JB 08H,TM5
XCH A,28H
XCH A,29H
XCH A,2BH
XCH A,2CH
SJMP TM4
TM5:MOV A,29H
SWAP A
ORL A,28H
MOV 58H,A
MOV A,2CH
SWAP A
ORL A,2BH
MOV 57H,A
LCALL TMW
TM6:POP 2EH
POP 27H
RET
DYSZ:NOP
PUSH 27H
PUSH 2EH
ANL 27H,#32H
MOV 2EH,#00H
MOV 28H,49H
MOV A,#10H
MOV 29H,A
MOV 2AH,A
MOV 2BH,A
MOV 2CH,A
MOV 2DH,#18H
DY1:LCALL KA
JB 07H,DY3
JB 08H,DY2
MOV 28H,A
SJMP DY1
DY2:MOV A,28H
ANL A,#03H
JZ DY3
MOV 49H,A
MOV DPTR,#7F00H
LCALL WRIT
DY3:POP 2EH
POP 27H
RET
ZX:PUSH 27H
PUSH 2EH
PUSH 4AH
PUSH 4BH
CLR A
MOV 4AH,A
MOV 4BH,A
MOV 6AH,A
MOV 6BH,A
ANL 27H,#32H
MOV 7FH,2EH
MOV 2EH,#00H
MOV 2DH,#10H
MOV 2CH,#19H
MOV 2BH,#0EH
MOV 2AH,#0AH
MOV 29H,#0DH
MOV 28H,#10H
ZX0:LCALL KY
CJNE A,#1,ZX1
LCALL ZJZ
SJMP ZX4
ZX1:CJNE A,#5,ZX2
LCALL ZPZ
SJMP ZX4
ZX2:CJNE A,#2,ZX3
LCALL ZJG
SJMP ZX4
ZX3:CJNE A,#15,ZX0
ZX4:POP 4BH
POP 4AH
POP 2EH
POP 27H
RET
NO:MOV A,6AH
ADD A,#1
DA A
MOV 6AH,A
MOV A,6BH
ADDC A,#0
DA A
MOV 6BH,A
RET
NOO:MOV A,4AH
ADD A,#1
DA A
MOV 4AH,A
MOV A,4BH
ADDC A,#0
DA A
MOV 4BH,A
RET
NOXS:NOP
MOV 2EH,#00H
MOV 2DH,#16H
MOV 2CH,#17H
MOV 2BH,#10H
MOV 2AH,6BH
MOV A,6AH
SWAP A
ANL A,#0FH
MOV 29H,A
MOV A,6AH
ANL A,#0FH
MOV 28H,A
RET
RQXS:NOP
MOV 2EH,#04H
MOV 2DH,#0DH
MOV 2CH,#10H
MOV A,55H
SWAP A
ANL A,#0FH
MOV 2BH,A
MOV A,55H
ANL A,#0FH
MOV 2AH,A
MOV A,56H
SWAP A
ANL A,#0FH
MOV 29H,A
MOV A,56H
ANL A,#0FH
MOV 28H,A
RET
SJXS:NOP
MOV 2EH,#00H
MOV 2DH,#1AH
MOV A,57H
SWAP A
ANL A,#0FH
MOV 2CH,A
MOV A,57H
ANL A,#0FH
MOV 2BH,A
MOV 2AH,#12H
MOV A,58H
SWAP A
ANL A,#0FH
MOV 29H,A
MOV A,58H
ANL A,#0FH
MOV 28H,A
RET
CHXS:NOP
MOV 2EH,#00H
MOV 2DH,#0CH
MOV 2CH,51H
MOV A,52H
SWAP A
ANL A,#0FH
MOV 2BH,A
MOV A,52H
ANL A,#0FH
MOV 2AH,A
MOV A,53H
SWAP A
ANL A,#0FH
MOV 29H,A
MOV A,53H
ANL A,#0FH
MOV 28H,A
RET
HHXS:NOP
MOV 2EH,#00H
MOV 2DH,#13H
MOV 2CH,#10H
MOV 2BH,#10H
MOV 2AH,#10H
MOV A,59H
SWAP A
ANL A,#0FH
MOV 29H,A
MOV A,59H
ANL A,#0FH
MOV 28H,A
RET
MZXS:NOP
MOV 2EH,7FH
MOV R1,5AH
MOV R2,5BH
MOV R3,#0
MOV R4,30H
LCALL MU1
LCALL BCD24
LCALL SY
RET
PZXS:NOP
MOV 2EH,7FH
MOV R1,5CH
MOV R2,5DH
MOV R3,#0
MOV R4,30H
LCALL MU1
LCALL BCD24
LCALL SY
RET
NZXS:NOP
MOV 2EH,7FH
MOV R1,5EH
MOV R2,5FH
MOV R3,#0
MOV R4,30H
LCALL MU1
LCALL BCD24
LCALL SY
RET
CPZ:MOV DPL,6EH
MOV DPH,6FH
MOV R7,#5
CPZ0:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,CPZ0
RET
ZJZ:CLR 17H
MOV DPTR,#0000H
JZ0:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
CJNE A,#0F0H,JZ10
SETB 17H
LCALL RPP
LCALL NO
LCALL NOXS
JZ1:LCALL KY
CJNE A,#15,JZ2
SJMP JZ11
JZ2:CJNE A,#16,JZ1
ACALL CHXS
JZ3:LCALL KY
CJNE A,#15,JZ4
SJMP JZ11
JZ4:CJNE A,#12,JZ5
ACALL CPZ
SJMP JZ9
JZ5:CJNE A,#16,JZ3
ACALL PZXS
JZ6:LCALL KY
CJNE A,#15,JZ7
SJMP JZ11
JZ7:CJNE A,#12,JZ8
ACALL CPZ
SJMP JZ9
JZ8:CJNE A,#16,JZ6
JZ9:MOV DPL,6EH
MOV DPH,6FH
JZ10:LCALL LH5
MOV A,DPL
CJNE A,#0FFH,JZ0
MOV A,DPH
CJNE A,#05H,JZ0
JB 17H,JZ11
LCALL E12
JZ11:LCALL CLP
RET
ZPZ:CLR 17H
MOV DPTR,#0600H
ZPZ0:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
CJNE A,#0F0H,ZPZ10
SETB 17H
LCALL RPP
LCALL NO
LCALL NOXS
ZPZ1:LCALL KY
CJNE A,#15,ZPZ2
SJMP ZPZ11
ZPZ2:CJNE A,#16,ZPZ1
ACALL CHXS
ZPZ3:LCALL KY
CJNE A,#15,ZPZ4
SJMP ZPZ11
ZPZ4:CJNE A,#12,ZPZ5
ACALL CPZ
SJMP ZPZ9
ZPZ5:CJNE A,#16,ZPZ3
ACALL PZXS
ZPZ6:LCALL KY
CJNE A,#15,ZPZ7
SJMP ZPZ11
ZPZ7:CJNE A,#12,ZPZ8
ACALL CPZ
SJMP ZPZ9
ZPZ8:CJNE A,#16,ZPZ6
ZPZ9:MOV DPL,6EH
MOV DPH,6FH
ZPZ10:LCALL LH5
MOV A,DPH
CJNE A,#10H,ZPZ0
JB 17H,ZPZ11
LCALL E12
ZPZ11:LCALL CLP
RET
ZJG:NOP
MOV 2DH,#19H
MOV 2CH,#0DH
MOV 2BH,#10H
MOV 2AH,#10H
MOV 29H,#10H
MOV 28H,#1
JG0:LCALL KA
JB 07H,JG4
JB 08H,JG1
MOV 28H,A
SJMP JG0
JG1:MOV A,28H
CJNE A,#1,JG2
ACALL ZCH
RET
JG2:CJNE A,#2,JG3
ACALL ZHH
RET
JG3:CJNE A,#3,JG4
LCALL ZRQ
JG4:RET
ZCX:JB 17H,ZCY
LCALL E12
ZCY:RET
ZCZ:AJMP ZC23
ZCH:CLR 17H
LCALL CH
JNB 07H,ZC0
RET
ZC0:NOP
MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
MOV DPTR,#1000H
ZC1:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
MOV R4,A
ANL A,#0F0H
CJNE A,#0F0H,ZCX
LCALL NOO
MOV A,R4
ANL A,#0FH
CJNE A,51H,ZCZ
INC DPTR
LCALL READ
CJNE A,52H,ZCZ
INC DPTR
LCALL READ
CJNE A,53H,ZCZ
SETB 17H
MOV DPL,6EH
MOV DPH,6FH
LCALL CO
LCALL NO
LCALL NOXS
ZC2:LCALL KY
CJNE A,#15,ZC3
SJMP ZCX
ZC3:CJNE A,#11,ZC4
LCALL TB
AJMP ZC23
ZC4:CJNE A,#16,ZC2
LCALL RQXS
ZC5:LCALL KY
CJNE A,#15,ZC6
SJMP ZCX
ZC6:CJNE A,#11,ZC7
LCALL TB
AJMP ZC23
ZC7:CJNE A,#16,ZC5
LCALL SJXS
ZC8:LCALL KY
CJNE A,#15,ZC9
AJMP ZCX
ZC9:CJNE A,#11,ZC10
LCALL TB
AJMP ZC23
ZC10:CJNE A,#16,ZC8
ACALL HHXS
ZC11:LCALL KY
CJNE A,#15,ZC12
AJMP ZCX
ZC12:CJNE A,#11,ZC13
LCALL TB
AJMP ZC23
ZC13:CJNE A,#16,ZC11
ACALL MZXS
ZC14:LCALL KY
CJNE A,#15,ZC15
AJMP ZCX
ZC15:CJNE A,#11,ZC16
LCALL TB
SJMP ZC23
ZC16:CJNE A,#16,ZC14
ACALL PZXS
ZC17:LCALL KY
CJNE A,#15,ZC18
AJMP ZCX
ZC18:CJNE A,#11,ZC19
LCALL TB
SJMP ZC23
ZC19:CJNE A,#16,ZC17
ACALL NZXS
ZC20:LCALL KY
CJNE A,#15,ZC21
AJMP ZCX
ZC21:CJNE A,#11,ZC22
LCALL TB
SJMP ZC23
ZC22:CJNE A,#16,ZC20
ZC23:NOP
MOV DPL,6EH
MOV DPH,6FH
LCALL LH15
MOV A,DPL
CJNE A,#78H,ZC24
MOV A,DPH
CJNE A,#79H,ZC24
AJMP ZCX
ZC24:AJMP ZC1
ZHX:JB 17H,ZHY
LCALL E12
ZHY:RET
ZHZ:AJMP ZH23
ZHH:CLR 17H
LCALL HH
JNB 07H,ZH0
RET
ZH0:NOP
MOV DPTR,#1000H
ZH1:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
CJNE A,#0F0H,ZHX
LCALL NOO
MOV A,DPL
ADD A,#8
MOV DPL,A
MOV A,DPH
ADDC A,#0
MOV DPH,A
LCALL READ
CJNE A,59H,ZHZ
SETB 17H
MOV DPL,6EH
MOV DPH,6FH
LCALL CO
LCALL NO
LCALL NOXS
ZH2:LCALL KY
CJNE A,#15,ZH3
SJMP ZHX
ZH3:CJNE A,#11,ZH4
LCALL TB
AJMP ZH23
ZH4:CJNE A,#16,ZH2
LCALL RQXS
ZH5:LCALL KY
CJNE A,#15,ZH6
SJMP ZHX
ZH6:CJNE A,#11,ZH7
LCALL TB
AJMP ZH23
ZH7:CJNE A,#16,ZH5
LCALL SJXS
ZH8:LCALL KY
CJNE A,#15,ZH9
AJMP ZHX
ZH9:CJNE A,#11,ZH10
LCALL TB
AJMP ZH23
ZH10:CJNE A,#16,ZH8
ACALL CHXS
ZH11:LCALL KY
CJNE A,#15,ZH12
AJMP ZHX
ZH12:CJNE A,#11,ZH13
LCALL TB
AJMP ZH23
ZH13:CJNE A,#16,ZH11
ACALL MZXS
ZH14:LCALL KY
CJNE A,#15,ZH15
AJMP ZCX
ZH15:CJNE A,#11,ZH16
LCALL TB
SJMP ZH23
ZH16:CJNE A,#16,ZH14
ACALL PZXS
ZH17:LCALL KY
CJNE A,#15,ZH18
AJMP ZHX
ZH18:CJNE A,#11,ZH19
LCALL TB
SJMP ZH23
ZH19:CJNE A,#16,ZH17
ACALL NZXS
ZH20:LCALL KY
CJNE A,#15,ZH21
AJMP ZHX
ZH21:CJNE A,#11,ZH22
LCALL TB
SJMP ZH23
ZH22:CJNE A,#16,ZH20
ZH23:NOP
MOV DPL,6EH
MOV DPH,6FH
LCALL LH15
MOV A,DPL
CJNE A,#78H,ZH24
MOV A,DPH
CJNE A,#79H,ZH24
AJMP ZHX
ZH24:AJMP ZH1
RQ:LCALL TMR
MOV 2EH,#04H
MOV 2DH,#0DH
MOV 2CH,#10H
MOV A,55H
SWAP A
ANL A,#0FH
MOV 2BH,A
MOV A,55H
ANL A,#0FH
MOV 2AH,A
MOV A,56H
SWAP A
ANL A,#0FH
MOV 29H,A
MOV A,56H
ANL A,#0FH
MOV 28H,A
RQ0:LCALL KA
JB 07H,RQ2
JB 08H,RQ1
LCALL X4
SJMP RQ0
RQ1:MOV A,29H
SWAP A
ORL A,28H
MOV 56H,A
MOV A,2BH
SWAP A
ORL A,2AH
MOV 55H,A
RQ2:RET
ZQX:JB 17H,ZQY
LCALL E12
ZQY:RET
ZQZ:AJMP ZQ23
ZRQ:CLR 17H
LCALL RQ
JNB 07H,ZQ0
RET
ZQ0:NOP
MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
MOV DPTR,#1000H
ZQ1:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
CJNE A,#0F0H,ZQX
LCALL NOO
MOV A,DPL
ADD A,#4
MOV DPL,A
MOV A,DPH
ADDC A,#0
MOV DPH,A
LCALL READ
CJNE A,55H,ZQZ
INC DPTR
LCALL READ
CJNE A,56H,ZQZ
SETB 17H
MOV DPL,6EH
MOV DPH,6FH
LCALL CO
LCALL NO
LCALL NOXS
ZQ2:LCALL KY
CJNE A,#15,ZQ3
SJMP ZQX
ZQ3:CJNE A,#11,ZQ4
LCALL TB
AJMP ZQ23
ZQ4:CJNE A,#16,ZQ2
LCALL SJXS
ZQ5:LCALL KY
CJNE A,#15,ZQ6
SJMP ZQX
ZQ6:CJNE A,#11,ZQ7
LCALL TB
AJMP ZQ23
ZQ7:CJNE A,#16,ZQ5
LCALL CHXS
ZQ8:LCALL KY
CJNE A,#15,ZQ9
LJMP ZQX
ZQ9:CJNE A,#11,ZQ10
LCALL TB
AJMP ZQ23
ZQ10:CJNE A,#16,ZQ8
LCALL HHXS
ZQ11:LCALL KY
CJNE A,#15,ZQ12
LJMP ZQX
ZQ12:CJNE A,#11,ZQ13
LCALL TB
AJMP ZQ23
ZQ13:CJNE A,#16,ZQ11
LCALL MZXS
ZQ14:LCALL KY
CJNE A,#15,ZQ15
LJMP ZQX
ZQ15:CJNE A,#11,ZQ16
LCALL TB
AJMP ZQ23
ZQ16:CJNE A,#16,ZQ14
LCALL PZXS
ZQ17:LCALL KY
CJNE A,#15,ZQ18
LJMP ZQX
ZQ18:CJNE A,#11,ZQ19
LCALL TB
AJMP ZQ23
ZQ19:CJNE A,#16,ZQ17
LCALL NZXS
ZQ20:LCALL KY
CJNE A,#15,ZQ21
LJMP ZQX
ZQ21:CJNE A,#11,ZQ22
LCALL TB
AJMP ZQ23
ZQ22:CJNE A,#16,ZQ20
ZQ23:NOP
MOV DPL,6EH
MOV DPH,6FH
LCALL LH15
MOV A,DPL
CJNE A,#78H,ZQ24
MOV A,DPH
CJNE A,#79H,ZQ24
LJMP ZQX
ZQ24:AJMP ZQ1
EE:MOV 28H,#10H
MOV 2BH,#19H
MOV 2CH,#0EH
MOV 2DH,#10H
PUSH 07H
MOV R7,#150
EE1:LCALL DL2
DJNZ R7,EE1
POP 07H
RET
E1:NOP
MOV 2AH,#0
MOV 29H,#1
ACALL EE
RET
E2:NOP
MOV 2AH,#0
MOV 29H,#2
ACALL EE
RET
E3:NOP
MOV 2AH,#0
MOV 29H,#3
ACALL EE
RET
E4:NOP
MOV 2AH,#0
MOV 29H,#4
ACALL EE
RET
E5:NOP
MOV 2AH,#0
MOV 29H,#5
ACALL EE
RET
E6:NOP
MOV 2AH,#0
MOV 29H,#6
ACALL EE
RET
E7:NOP
MOV 2AH,#0
MOV 29H,#7
ACALL EE
RET
E8:NOP
MOV 2AH,#0
MOV 29H,#8
ACALL EE
RET
E9:NOP
MOV 2AH,#0
MOV 29H,#9
ACALL EE
RET
E10:NOP
MOV 2AH,#1
MOV 29H,#0
ACALL EE
RET
E11:NOP
MOV 2AH,#1
MOV 29H,#1
ACALL EE
RET
E12:NOP
MOV 2AH,#1
MOV 29H,#2
ACALL EE
RET
E13:NOP
MOV 2AH,#1
MOV 29H,#3
ACALL EE
RET
E14:NOP
MOV 2AH,#1
MOV 29H,#4
ACALL EE
RET
CC:CLR 12H
JB 0CH,CC0
JB 0DH,CC0
JNB 0EH,CC0
SETB 12H
RET
CC0:ACALL E8
RET
CH:CLR A
MOV 28H,A
MOV 29H,A
MOV 2AH,A
MOV 2BH,A
MOV 2CH,A
MOV 2DH,#0CH
CH0:LCALL KA
JB 07H,CH2
JB 08H,CH1
LCALL X5
SJMP CH0
CH1:MOV A,29H
SWAP A
ORL A,28H
MOV R3,A
MOV A,2BH
SWAP A
ORL A,2AH
MOV R2,A
MOV A,2CH
MOV R1,A
CH2:RET
HH:CLR A
MOV 28H,A
MOV 29H,A
MOV A,#10H
MOV 2AH,A
MOV 2BH,A
MOV 2CH,A
MOV 2DH,#13H
HH0:LCALL KA
JB 07H,HH2
JB 08H,HH1
LCALL X2
SJMP HH0
HH1:MOV A,29H
SWAP A
ORL A,28H
MOV 59H,A
HH2:RET
LH5:CLR C
MOV A,DPL
ADD A,#5
MOV DPL,A
MOV A,DPH
ADDC A,#0
MOV DPH,A
RET
LH15:CLR C
MOV A,DPL
ADD A,#15
MOV DPL,A
MOV A,DPH
ADDC A,#0
MOV DPH,A
RET
CL5:MOV R7,#5
CL50:CLR A
LCALL WRIT
INC DPTR
DJNZ R7,CL50
RET
CL15:MOV R0,#51H
MOV R7,#15
CLR A
CL150:MOV @R0,A
INC R0
DJNZ R7,CL150
RET
CN:MOV DPTR,#1000H
CN0:LCALL READ
ANL A,#0F0H
CJNE A,#0F0H,CN1
LCALL LH15
MOV A,DPH
CJNE A,#79H,CN0
MOV A,DPL
CJNE A,#78H,CN0
LCALL E1
RET
CN1:LCALL TMR
MOV R0,#51H
MOV R7,#15
CN2:MOV A,@R0
LCALL WRIT
INC R0
INC DPTR
DJNZ R7,CN2
ANL 51H,#0FH
CLR C
MOV A,4AH
ADD A,#1
DA A
MOV 4AH,A
MOV A,4BH
ADDC A,#0
DA A
MOV 4BH,A
MOV DPTR,#7F01H
MOV A,4AH
LCALL WRIT
INC DPTR
MOV A,4BH
LCALL WRIT
RET
RP:LCALL READ
MOV 5CH,A
INC DPTR
LCALL READ
MOV 5DH,A
RET
RPP:LCALL READ
ANL A,#0FH
MOV 51H,A
INC DPTR
LCALL READ
MOV 52H,A
INC DPTR
LCALL READ
MOV 53H,A
INC DPTR
LCALL READ
MOV 5CH,A
INC DPTR
LCALL READ
MOV 5DH,A
RET
YCCC:NOP
PUSH 27H
PUSH 2EH
ANL 27H,#32H
MOV 2EH,#00H
LCALL CC
JNB 12H,YC1
LCALL CH
JB 07H,YC1
JB 15H,YCX
MOV A,R1
JNZ YC2
MOV A,R2
JNZ YC2
MOV A,R3
JNZ YC2
MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
MOV A,46H
MOV 5AH,A
MOV 5EH,A
MOV A,47H
MOV 5BH,A
MOV 5FH,A
YC0:LCALL HH
JB 07H,YC1
ORL 51H,#0F0H
LCALL CN
LCALL TA
YC1:LCALL CL15
POP 2EH
POP 27H
RET
YCX:LJMP YCY
YC2:MOV DPTR,#0600H
YC3:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
MOV R4,A
ANL A,#0F0H
CJNE A,#0F0H,YC4
MOV A,R4
ANL A,#0FH
CJNE A,01H,YC4
INC DPTR
LCALL READ
CJNE A,02H,YC4
INC DPTR
LCALL READ
CJNE A,03H,YC4
MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
INC DPTR
YCXX:LCALL RP

YC31:CLR C
MOV A,46H
MOV 5AH,A
SUBB A,5CH
MOV 5EH,A
MOV A,47H
MOV 5BH,A
SUBB A,5DH
MOV 5FH,A
JNC YC0

LCALL E3
SJMP YC1
YC4:MOV DPL,6EH
MOV DPH,6FH
LCALL LH5
MOV A,DPH
CJNE A,#10H,YC3

MOV DPTR,#1000H
MOV 6EH,DPL
MOV 6FH,DPH
YC6:LCALL READ
MOV R4,A
ANL A,#0F0H
CJNE A,#0F0H,YC8
MOV A,R4
ANL A,#0FH
CJNE A,01H,YC7
INC DPTR
LCALL READ
CJNE A,02H,YC7
INC DPTR
LCALL READ
CJNE A,03H,YC7
MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
MOV A,DPL
ADD A,#9
MOV DPL,A
MOV A,DPH
ADDC A,#0
MOV DPH,A
SJMP YCXX
YC7:MOV A,6EH
ADD A,#15
MOV 6EH,A
MOV DPL,A
MOV A,6FH
ADDC A,#0
MOV 6FH,A
MOV DPH,A
SJMP YC6
YC8:LCALL E2
LJMP YC1

YCY:MOV 51H,R1
MOV 52H,R2
MOV 53H,R3

YCY1:MOV 5CH,6CH
MOV 5DH,6DH
YCY2:CLR C
MOV A,46H
MOV 5AH,A
SUBB A,5CH
MOV 5EH,A
MOV A,47H
MOV 5BH,A
SUBB A,5DH
MOV 5FH,A
LCALL HH
JB 07H,YC5
ORL 51H,#0F0H
LCALL CN
LCALL TA
YC5:LJMP YC1
CLP:CLR A
MOV 51H,A
MOV 52H,A
MOV 53H,A
MOV 5CH,A
MOV 5DH,A
RET
ZP:JNB 0CH,ZP0
LCALL E8
RET
ZP0:JB 0EH,ZP1
LCALL YZPZ
RET
ZP1:LCALL SZPZ
RET
SZPZ:NOP
PUSH 27H
PUSH 2EH
ANL 27H,#32H
MOV 7FH,2EH
MOV 2EH,#00H
LCALL CH
JB 07H,SZ0
MOV A,R1
JNZ SZ1
MOV A,R2
JNZ SZ1
MOV A,R3
JNZ SZ1
LCALL E4
SZ0:LCALL CLP
POP 2EH
POP 27H
RET
SZ1:MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
LCALL HH
JB 07H,SZ0
MOV 2EH,7FH
CLR 0CH
CLR A
MOV 70H,A
MOV 71H,A
MOV 72H,A
SZ2:LCALL SY
LCALL KA
JB 07H,SZ0
JB 08H,SZ3
LCALL BTCA
SJMP SZ2
SZ3:LCALL BTCB
MOV R4,30H
LCALL DV1
MOV 5CH,R1
MOV 5DH,R2
CLR C
MOV A,46H
MOV 5AH,A
SUBB A,R1
MOV 5EH,A
MOV A,47H
MOV 5BH,A
SUBB A,R2
MOV 5FH,A
JNC SZ4
LCALL E3
SJMP SZ0
SZ4:ORL 51H,#0F0H
LCALL CN
LCALL TA
SJMP SZ0
YZPZ:NOP
PUSH 27H
PUSH 2EH
ANL 27H,#32H
MOV 7FH,2EH
YZ00:MOV 2EH,#00H
LCALL CH
MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
JB 07H,YZ0
MOV A,R1
JNZ YZ1
MOV A,R2
JNZ YZ1
MOV A,R3
JNZ YZ1
LCALL E4
YZ0:LCALL CLP
POP 2EH
POP 27H
RET
YZ1:MOV DPTR,#0600H
YZ2:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
MOV R4,A
ANL A,#0F0H
CJNE A,#0F0H,YZ3
MOV A,R4
ANL A,#0FH
CJNE A,01H,YZ3
INC DPTR
LCALL READ
CJNE A,02H,YZ3
INC DPTR
LCALL READ
CJNE A,03H,YZ3
INC DPTR
LCALL RP
SJMP YZ5
YZ3:MOV DPL,6EH
MOV DPH,6FH
LCALL LH5
MOV A,DPH
CJNE A,#10H,YZ2
MOV DPTR,#0600H
YZ4:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
CJNE A,#0F0H,YZ5
MOV DPL,6EH
MOV DPH,6FH
LCALL LH5
MOV A,DPH
CJNE A,#10H,YZ4
LCALL E5
YZ40:SJMP YZ0
YZ5:MOV 2EH,7FH
MOV R1,5CH
MOV R2,5DH
MOV R3,#0
MOV R4,30H
LCALL MU1
LCALL BCD24
CLR 0CH
YZ6:LCALL SY
LCALL KA
JB 07H,YZ40
JB 08H,YZ7
LCALL BTCA
SJMP YZ6
YZ7:LCALL BTCB
MOV R4,30H
LCALL DV1
MOV A,R1
JNZ YZ8
MOV A,R2
JNZ YZ8
LCALL E6
AJMP YZ0
YZ8:ACALL CZ
AJMP YZ00
CZ:MOV DPL,6EH
MOV DPH,6FH
MOV A,51H
ORL A,#0F0H
LCALL WRIT
INC DPTR
MOV A,52H
LCALL WRIT
INC DPTR
MOV A,53H
LCALL WRIT
INC DPTR
MOV A,R1
LCALL WRIT
INC DPTR
MOV A,R2
LCALL WRIT
LCALL CLP
RET
ECCC:NOP
PUSH 27H
PUSH 2EH
ANL 27H,#32H
MOV 2EH,#00H
LCALL CC
JNB 12H,EC0
CLR 12H
LCALL CH
JB 07H,EC0
MOV A,R1
JNZ EC1
MOV A,R2
JNZ EC1
MOV A,R3
JNZ EC1
LCALL E7
EC0:LCALL CL15
POP 2EH
POP 27H
RET
EC1:MOV 51H,R1
MOV 52H,R2
MOV 53H,R3
MOV DPTR,#0000H
EC2:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
MOV R4,A
ANL A,#0F0H
CJNE A,#0F0H,EC3
MOV A,R4
ANL A,#0FH
CJNE A,01H,EC3
INC DPTR
LCALL READ
CJNE A,02H,EC3
INC DPTR
LCALL READ
CJNE A,03H,EC3
SJMP EC6
EC3:MOV DPL,6EH
MOV DPH,6FH
LCALL LH5
MOV A,DPL
CJNE A,#0FFH,EC2
MOV A,DPH
CJNE A,#05H,EC2
MOV DPTR,#0000H
EC4:MOV 6EH,DPL
MOV 6FH,DPH
LCALL READ
ANL A,#0F0H
CJNE A,#0F0H,EC5
LCALL LH5
MOV A,DPL
CJNE A,#0FFH,EC4
MOV A,DPH
CJNE A,#05H,EC4
LCALL E9
SJMP EC0
EC5:MOV R1,46H
MOV R2,47H
ACALL CZ
SJMP EC0
EC6:LCALL HH
JB 07H,EC8
MOV DPL,6EH
MOV DPH,6FH
CLR A
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
INC DPTR
CLR A
LCALL WRIT
INC DPTR
LCALL READ
MOV R1,A
CLR A
LCALL WRIT
INC DPTR
LCALL READ
MOV R2,A
CLR A
LCALL WRIT
MOV 5CH,R1
MOV 5DH,R2
CLR C
MOV A,46H
MOV 5AH,A
SUBB A,R1
MOV 5EH,A
MOV A,47H
MOV 5BH,A
SUBB A,R2
MOV 5FH,A
JNC EC7
MOV 5CH,46H
MOV 5DH,47H
CLR C
MOV A,R1
MOV 5AH,A
SUBB

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!