trd(SM412,D6000);
IF D6010<>D6002 THEN D6010:=D6002;
FOR ii:=0 TO 49 DO
Chanliang(ii,8):=Chanliang(ii,7);
Chanliang(ii,7):=Chanliang(ii,6);
Chanliang(ii,6):=Chanliang(ii,5);
Chanliang(ii,5):=Chanliang(ii,4);
Chanliang(ii,4):=Chanliang(ii,3);
Chanliang(ii,3):=Chanliang(ii,2);
END_FOR ii;
END_IF;
IF M6007:=TRUE THEN
Chengxuhao(D800,0):=D800;
Chengxuhao(D800,1):=D801;
Chengxuhao(D800,2):=Chengxuhao(D800,1)+1;
END_IF;
//*求和
FOR ii:=0 TO 49 DO
FOR jj=2 TO 8 DO
chanliang(ii,9):=chanliang(ii,9)+chanliang(ii,jj)
END_FOR jj;
END_FOR ii;
IF M401 THEN
Z0:=Z0+1
IF Z0>5 THEN
Z0:=4
END_IF;
END_IF;
IF M400 THEN
Z0:=Z0-1;
IF Z0<=0 THEN
Z0=0;
END_IF;
END_IF;
D6008:=Z0*K10;