10 REM Etude Move-XY 20 CLS:X=16:Y=22:C=#F9 30 LOCATE X,Y:PRINT CHR$(C); 40 @DO 50 K=INKEY() 60 IFK>0 THEN LOCATE X,Y:PRINT CHR$(0); 70 V=X:X=X-(K=28)+(K=29) 80 IF (X<0)OR (X>31) THEN X=V 90 W=Y:Y=Y-(K=30)+(K=31) 100 IF (Y<0) OR (Y>22) THEN Y=W 110 LOCATE 0,0:PRINT X;",",Y;CHR$(12); 120 LOCATE X,Y:PRINT CHR$(C); 130 GOTO@DO 10 'EtudeMove-XY 20 CLS:X=16:Y=22:C=#F9: LCX,Y:?CHR$(C); 30 @DO:K=INKEY():IFK>0THENLCX,Y:?CHR$(0); 40 V=X:W=Y:X=X-(K=28)+(K=29): Y=Y-(K=30)+(K=31) 50 IF(X<0)OR(X>31)OR(Y<0)OR(Y>22)THENX=V:Y=W 60 LC0,0:?X;",",Y;CHR$(12);:LCX,Y:?CHR$(C);:GOTO@DO