	SECT	DROP
/	 SUBROUTINE DROP(OBJECT,WHERE)
/	 C
/	 C PLACE AN OBJECT AT A GIVEN LOC, PREFIXING IT ONTO THE ATLOC LIST.
/	 C DECR HOLDNG IF THE OBJECT WAS BEING TOTED.
/	 C
/	 IMPLICIT INTEGER (A-Z)
/	 COMMON /PLACOM/ ATLOC,LINK,PLACE,FIXED,HOLDNG
/	 DIMENSION ATLOC(150)
/	 DIMENSION LINK(200)
/	 DIMENSION PLACE(100)
/	 DIMENSION FIXED(100)

	JA	#ST
#XR,	ORG	.+10
	TEXT	+DROP  +
#RET,	SETX	#XR
	SETB	#BASE
	JA	.+3
#BASE,	ORG	.+6
OBJECT,	ORG	.+3
WHERE,	ORG	.+3
ONE,	F 1.0
HUND,	F 100.0
M1,	F -1.0
	ORG	#BASE+30
	FNOP
	JA	#RET
	FNOP
#GOBAK,	0;0
	#LBL=.
	COMMON	PLACOM
ATLOC,	ORG	.+702
LINK,	ORG	.+1130
PLACE,	ORG	.+454
FIXED,	ORG	.+454
HOLDNG,	ORG	.+3
	ORG	#LBL
#RTN,	BASE	#BASE
	JA	#GOBAK
#ST,	STARTD
	0210
	FSTA	#GOBAK,0
	0200
	SETX	#XR
	SETB	#BASE
	LDX	0,1
	FSTA	#BASE
	FLDA%	#BASE,1+
	FSTA	OBJECT
	FLDA%	#BASE,1+
	FSTA	WHERE
	STARTF
	FLDA%	WHERE		/Pre-load index regs
	ATX	6
	FLDA%	OBJECT
	ATX	7
/	 IF(OBJECT.GT.100)GOTO 1
	FSUB	HUND
	ATX	5		/Save object-100
	JGT	#1
/	 IF(PLACE(OBJECT).EQ.-1)HOLDNG=HOLDNG-1
	FLDA	ONE
	FADD	PLACE-3,7
	JNE	#G1
	FLDA	M1
	FADDM	HOLDNG
/	 PLACE(OBJECT)=WHERE
#G1,	FLDA%	WHERE
	FSTA	PLACE-3,7
/	 GOTO 2
	JA	#2

/	 1	FIXED(OBJECT-100)=WHERE
#1,	FLDA%	WHERE
	FSTA	FIXED-3,5

/	 2	IF(WHERE.LE.0)RETURN
#2,	JLE	#RTN
/	 LINK(OBJECT)=ATLOC(WHERE)
#G2,	FLDA	ATLOC-3,6
	FSTA	LINK-3,7
/	 ATLOC(WHERE)=OBJECT
	XTA	7
	FSTA	ATLOC-3,6
/	 RETURN
/	 END
	JA	#RTN
	END
