DXA_P00:
MOV TH0,#4CH
MOV TL0,#00H
MOV CNT_A,#5
MOV CNT_DJS,#00
MOV STEPADDR,#4FH ;设置保存数据的起始地址-1(50H-1)
LCALL CHECKPRO ;取当前步长
MOV NOWSTEP,A
DXA_P01:
LCALL CHECKPRO
CJNE A,NOWSTEP,DXA_P02
CLR SG_19
SJMP DXA_P01
DXA_P02:
SETB SG_19
MOV NOWSTEPT,CNT_DJS
MOV CNT_D,CNT_A
MOV CNT_B,#00
DXA_P03:
LCALL CHECKPRO
CJNE A,NOWSTEP,DXA_P04
SJMP DXA_P01
DXA_P04:
MOV A,CNT_B
CJNE A,#15,DXA_P03
MOV A,CNT_D
CJNE A,#10,DXA_P05
INC NOWSTEPT
SJMP DXA_P07
DXA_P05:
JNC DXA_P07
INC NOWSTEPT
DXA_P07:
MOV A,50H
CJNE A,NOWSTEP,DXA_P11
MOV A,60H
CJNE A,NOWSTEPT,DXA_P08
SJMP DXA_P10
DXA_P08:
MOV A,60H
INC A
CJNE A,NOWSTEPT,DXA_P09
SJMP DXA_P10
DXA_P09:
MOV A,60H
DEC A
CJNE A,NOWSTEPT,DXA_P11
SJMP DXA_P10
DXA_P10:
LCALL CHECKPRO
CJNE A,51H,DXA_P11
SJMP DXA_P13
DXA_P11:
MOV A,STEPADDR
CJNE A,#5FH,DXA_P12
LJMP MAIN
DXA_P12:
INC STEPADDR
MOV R0,STEPADDR
MOV A,NOWSTEP
MOV @R0,A
MOV A,R0
ADD A,#10H
MOV R0,A
MOV A,NOWSTEPT
MOV @R0,A
LCALL CHECKPRO
MOV NOWSTEP,A
MOV TH0,#4CH
MOV TL0,#00H
MOV CNT_A,#5
MOV CNT_DJS,#00
LJMP DXA_P01
DXA_P13:
MOV ENDADDR,STEPADDR
MOV STEPADDR,#51H
MOV NOWSTEP,51H
MOV DOWN_A,61H
MOV A,STEPADDR
CJNE A,ENDADDR,DXA_P14
MOV NEXTSTEP,50H
MOV TH0,#4CH
MOV TL0,#00H
MOV CNT_A,#5
MOV CNT_C,#00
SETB SG_17
SJMP DXA_P15
DXA_P14:
INC A
MOV R0,A
MOV A,@R0
MOV NEXTSTEP,A
MOV TH0,#4CH
MOV TL0,#00H
MOV CNT_A,#5
MOV CNT_C,#00
SETB SG_17
SJMP DXA_P15