	SUBROUTINE MARK(ID,N)
C	N=0:
C	ROUTINE TO ALLOW PLAYERS TO LEAVE MARKERS IN THE CUBE.
C	EACH PLAYER HAS TWO MARKERS WHICH CAN BE USED FOR NAVIGATIONAL
C	PURPOSES, TO LET HIM CREATE A SEMI-PERMANENT REFERENCE FRAME
C	INSIDE THE CUBE.
C 
C	N=1:
C	ROUTINE TO DESCRIBE LOCATIONS OF MARKERS RELATIVE TO CRAWLERS
C----------------------standard common block----------------------------
C 
	COMMON ICR(8,12),IPARM(10),IS1,IS2,NT,ICU(10,10,10,2),CLEAR(8)
	COMMON MARKER(4,3,3)
	LOGICAL*1 ICU,CLEAR
C 
C-----------------------------------------------------------------------
	LOGICAL*1 ANS
	DIMENSION IDIFF(3)
C	MARKER(I,J,K):
C	I=CRAWLER ID 1 to 4
C	J=DIRECTION X,Y,Z (1 to 3)
C	K=MARKER A,B, OR C
C 
	LUN=ICR(ID,8)
	I0=ICR(ID,10)
	J0=ICR(ID,11)
	K0=ICR(ID,12)
	IF(N.NE.0) GOTO 200
	IF(ICR(ID,9).LT.1) GOTO 300
	ICR(ID,9)=ICR(ID,9)-1
3	WRITE(LUN,1)
1	FORMAT(' transmitter (A,B,C) ? ',$)
	READ(LUN,2) ANS
2	FORMAT(A1)
	IF(ANS.LT.'A'.OR.ANS.GT.'C') GOTO 98   ! ABORT
	IF(ANS.EQ.'A') IM=1
	IF(ANS.EQ.'B') IM=2
	IF(ANS.EQ.'C') IM=3
	IF(MARKER(ID,1,IM).LE.0) GOTO 25 ! PLACE MARKER IM
	MARKER(ID,1,IM)=-1  ! FLAG TO ABOVE STATEMENT; COLLECTED.
	WRITE(LUN,10) ANS
10	FORMAT(' transmitter ',A1,' has been collected.')
	GOTO 100
C 
C	PLACE MARKER:
25	MARKER(ID,1,IM)=I0
	MARKER(ID,2,IM)=J0
	MARKER(ID,3,IM)=K0
	WRITE(LUN,26) ANS
26	FORMAT(' transmitter ',A1,' has been placed at your'/
     C'         current position.')
	GOTO 100
98	WRITE(LUN,99)
99	FORMAT(' transmitter placement aborted')
100	RETURN
C 
C	ROUTINE B......
200	IN=0
	DO 201 IM=1,3
	IDIFF(IM)=0
	I1=MARKER(ID,1,IM)
	IF(I1.LE.0) GOTO 201
	IN=1
	J1=MARKER(ID,2,IM)
	K1=MARKER(ID,3,IM)
	X=(I0-I1)**2+(J0-J1)**2+(K0-K1)**2
	IDIFF(IM)=SQRT(X)
201	CONTINUE
	IF(IN.EQ.0) GOTO 100
	WRITE(LUN,204) IDIFF
204	FORMAT(
     C' | TRANSMITTER DISTANCES |  A ',I2,' |  B ',I2,' |  C ',I2,' |
     C'/' +-------+-------+-------+-------+-------+-------+')
	GOTO 100
C 
300	WRITE(LUN,301)
301	FORMAT(' it takes more energy than you`ve got.')
	GOTO 100
	END
