;<134-TENEX>STRING.MAC;8    28-APR-75 11:42:23    EDIT BY CLEMENTS
;<134-TENEX>STRING.MAC;7    24-APR-75 14:22:30    EDIT BY CLEMENTS
;<TENEX-132>STRING.MAC;6     1-APR-74 21:28:14	EDIT BY TOMLINSON
; ADDED STRDTB AS ALTERNATE NAME FOR STRDEV
;<TENEX-132>STRING.MAC;5    10-NOV-73 18:20:45	EDIT BY CLEMENTS
; CHANGED TO XCTBU'S FOR KI/KA ASSEMBLY

	SEARCH	PROLOG
	TITLE	STRING
	USE	SWAPPC

EXTERN	CPOPJ,SKPRET

STRDTB::
STRDEV::REPEAT BIND,<
	CPOPJ>
	STRIN
	STROUT
	REPEAT SDSTD-BOUTD,<
	CPOPJ>

STRIN:	XCTBU [ILDB A,JFN]
	POPJ P,

STROUT:	XCTBU [IDPB A,JFN]
	POPJ P,

DBP::	LDB B,[POINT 6,A,5]
	LDB C,[POINT 6,A,11]
	ADD B,C
	IDIVI B,^D36
	JUMPE B,DBP1
	SUB A,B
	LDB C,[POINT 6,A,11]
	MOVEI B,^D36
	PUSH P,C
	IDIV B,C
	POP P,C
	IMUL B,C
	MOVNI C,-^D36(B)
DBP1:	DPB C,[POINT 6,A,5]
	POPJ P,

	END

