Google
 

Trailing-Edge - PDP-10 Archives - bb-y390o-bm_tops20_v41_atpch_20 - autopatch/alglib.c08
There are 14 other files named alglib.c08 in the archive. Click here to see a list.
 DEL 101/74	;08C1
		EDIT(226)		;CHANGE AT LLN8 IN ALGLIB [JBS 4/11/80]
 REP 26/110	;08C2
		MOVEI	A7,1
		MOVE	A10,A0		; SET UP DEFAULT PARAMETERS
		SOSN	A1,.V(DL)
		JRST	COPY1		; ONLY ONE PARAMETER
		CAMLE	A10,.M(DL)
		MOVE	A10,.M(DL)	; MIN(M,LENGTH(S))
		SOJE	A1,COPY1	; IF TWO PARAMETERS
		MOVE	A7,A10
		CAIGE	A7,1
		MOVEI	A7,1		; MAX(M,1)
		MOVE	A10,.N(DL)
		CAMLE	A10,A0
		MOVE	A10,A0		; MIN(N,LENGTH(S))
 WIT
		MOVEI	A7,1		;[347] SET UP DEFAULT PARAMETERS - START COPY
		MOVE	A10,A0		;[347] AT FIRST BYTE, END AT LAST BYTE
		SOSN	A1,.V(DL)	;[347] TEST # OF USER-SUPPLIED PARAMETERS
		 JRST	COPY1		;[347] JUMP IF 1 PARAMETER (COPY WHOLE STRING)
		CAMLE	A10,.M(DL)	;[347] TRYING TO COPY PAST END OF STRING?
		 MOVE	A10,.M(DL)	;[347] NO, PICK UP LAST BYTE # TO COPY (2 ARGS)
		SOJE	A1,COPY1	;[347] JUMP IF 2 PARAMS (COPY 1'ST- M'TH BYTES)
		CAMGE	A7,.M(DL)	;[347] STARTING COPY WITH AT LEAST FIRST BYTE?
		 MOVE	A7,.M(DL)	;[347] YES, START COPYING WHERE USER WANTS
		MOVE	A10,.N(DL)	;[347] NO, START AT BYTE 1 & GET LAST BYTE #
		CAMLE	A10,A0		;[347] INVALID END BYTE #?
		 MOVE	A10,A0		;[347] YES, END WITH LAST BYTE IN STRING
	;[347] A7 IS START BYTE, A10 IS END BYTE
 REP 15/122	;08C3
		MOVE	AX,-1(AX)	; [335] GET FORMAL BITS
		MOVEM	AX,A01TMP(DB)	; [335] PUT THEM HERE UNTIL WE NEED THEM
 WIT
		PUSH	SP,-1(AX)	; [351] SAVE FORMAL BITS ON STACK
 REP 27/122	;08C4
		HLRZ	A0,A01TMP(DB)	; [335] GET FORMAL BITS INTO RIGHT HALF
		TRZ	A0,77		; [335] TURN OFF WHAT WE DON'T CARE ABOUT
		CAIE	A0,$PRO!$S	; [335] STATIC SIMPLE STRING PROC (USER PROC.)?
		CAIN	A0,$D!$EXP!$S	; [335] DYNAMIC SIMPLE STR EXPR (STR EXPRSION)?
		 JRST	LAB321		; [335] YES, GO DELETE IT
		CAIE	A0,$PRO!$S!$EXT	; [335] STATIC EXTERN STR PROC. (ALGLIB PROC.)?
		JRST	.EXIT(DL)	; [335] NO, EXIT BUT DON'T DELETE IT
 WIT
		POP	SP,A0		; [351] RESTORE FORMAL BITS
		TDZ	A0,[$P,,-1]	; [351] TURN OFF EXTRA BITS
		CAME	A0,[($PRO!$S!$EXT)] ; [351] STATIC EXT STR PROC (ALGLIB PROC.)?
		CAMN	A0,[($PRO!$S)]	; [351] STATIC SIMPLE STRING PROC (USER PROC.)?
		 JRST	LAB321		; [351] YES, GO DELETE IT
		CAME	A0,[($D!$S!$EXP)] ; [351] NO, DYNAMIC STRING EXPRESSION?
		 JRST	.EXIT(DL)	; [351] NO, EXIT
		TLC	A2,STRDYN!STRPRC ; [351] YES, AND IS IT DYNAMIC AND THE RESULT
		TLCE	A2,STRDYN!STRPRC ; [351] OF A STRING PROCEDURE?
		 JRST	.EXIT(DL)	; [351] NO, EXIT
 REP 16/123	;08C5
		MOVE	AX,-1(AX)	; [335] GET FORMAL BITS
		MOVEM	AX,A01TMP(DB)	; [335] PUT THEM HERE UNTIL WE NEED THEM
 WIT
		PUSH	SP,-1(AX)	; [351] SAVE FORMAL BITS ON STACK
 REP 26/123	;08C6
		HLRZ	A0,A01TMP(DB)	; [335] GET FORMAL BITS INTO RIGHT HALF
		TRZ	A0,77		; [335] TURN OFF WHAT WE DON'T CARE ABOUT
		CAIE	A0,$PRO!$S	; [335] STATIC SIMPLE STRING PROC (USER PROC.)?
		CAIN	A0,$D!$EXP!$S	; [335] DYNAMIC SIMPLE STR EXPR (STR EXPRSION)?
		 JRST	LAB326		; [335] YES, GO DELETE IT
		CAIE	A0,$PRO!$S!$EXT	; [335] STATIC EXTERN STR PROC. (ALGLIB PROC.)?
		JRST	.EXIT(DL)	; [335] NO, EXIT BUT DON'T DELETE IT
 WIT
		POP	SP,A0		; [351] RESTORE FORMAL BITS
		TDZ	A0,[$P,,-1]	; [351] TURN OFF EXTRA BITS
		CAME	A0,[($PRO!$S!$EXT)] ; [351] STATIC EXT STR PROC (ALGLIB PROC.)?
		CAMN	A0,[($PRO!$S)]	; [351] STATIC SIMPLE STRING PROC (USER PROC.)?
		 JRST	LAB326		; [351] YES, GO DELETE IT
		CAME	A0,[($D!$S!$EXP)] ; [351] NO, DYNAMIC STRING EXPRESSION?
		 JRST	.EXIT(DL)	; [351] NO, EXIT
		TLC	A2,STRDYN!STRPRC ; [351] YES, AND IS IT DYNAMIC AND THE RESULT
		TLCE	A2,STRDYN!STRPRC ; [351] OF A STRING PROCEDURE?
		 JRST	.EXIT(DL)	; [351] NO, EXIT
 INS 37/125	;08C7
		MOVE	A2,PRGLNK(DL)	; [351] GET RETURN ADDR.
		MOVEI	A2,-1(A2)	; [351] GET POINTER TO FORMAL BITS
		PUSH	SP,A2		; [351] SAVE ON STACK FOR LATER
 REP 63/125	;08C8
		JUMPE	A1,CONCA7	; RETURN IF LENGTH IS ZERO
 WIT
		JUMPE	A1,.EXIT(DL)	; [351] RETURN IF LENGTH IS ZERO
 REP 12/126	;08C9
	CONCA5:	MOVNI	A2,.S		; GET SIZE OF ENTRY
		ADDB	A2,.W(DL)	; COUNT W DOWN TO POINT TO HEADER
		MOVEI	A2,@A2		; DELOCATE  ADDRESS
		MOVEI	A1,@STR1(A2)	; GET ADDRESS OF STRING
		MOVE	A0,STR2(A2)	; GET LENGTH INTO A0
		TLZE	A0,STRDYN	; IF STRING IS NOT DYNAMIC
		TLZN	A0,STRPRC	; OR NOT RESULT OF A PROCEDURE
		JRST	CONCA6		; LEAVE IT ALONE
		TDZE	A0,A0		; CLEAR A0 AND UNLESS ALREADY ZERO
		PUSHJ	SP,GETOWN	; CALL GETOWN TO RETURN THE SPACE
	CONCA6:	SOSLE	.N(DL)		; COUNT ONE MORE CHECKED
		JRST	CONCA5		; REPEAT FOR EACH STRING
	CONCA7:	JRST	.EXIT(DL)	; THEN RETURN
 WIT
	CONCA5:	POP	SP,AX		; [351] GET ADDR. OF FORMAL BITS FOR ARGS.
	CONCA6:	MOVNI	A2,.S		; [351] GET SIZE OF ENTRY
		ADDB	A2,.W(DL)	; [351] COUNT W DOWN TO POINT TO HEADER
		MOVEI	A2,@A2		; [351] DELOCATE ADDRESS
		MOVEI	A1,@STR1(A2)	; [351] GET ADDRESS OF STRING TO MAYBE DELETE
		MOVE	A2,STR2(A2)	; [351] GET STRING HEADER BITS
		MOVE	A0,(AX)		; [351] PICK UP ACTUAL PARAMETER BITS
		TDZ	A0,[$P,,-1]	; [351] TURN OFF EXTRA BITS
		CAME	A0,[($PRO!$S!$EXT)] ; [351] STATIC EXT STR PROC (ALGLIB PROC.)?
		CAMN	A0,[($PRO!$S)]	; [351] STATIC SIMPLE STRING PROC (USER PROC.)?
		 JRST	CONCA7		; [351] YES, GO DELETE IT
		CAME	A0,[($D!$S!$EXP)] ; [351] NO, DYNAMIC STRING EXPRESSION?
		 JRST	CONCA8		; [351] NO, LEAVE IT ALONE
		TLC	A2,STRDYN!STRPRC ; [351] YES, AND IS IT DYNAMIC AND THE RESULT
		TLCE	A2,STRDYN!STRPRC ; [351] OF A STRING PROCEDURE?
		 JRST	CONCA8		; [351] NO, LEAVE IT ALONE
	CONCA7:	SETZ	A0,		; [351] YES, GET READY TO DELETE THE STRING
		SKIPE	STR2(A2)	; [351] DON'T DELETE IF NULL STRING
		 PUSHJ	SP,GETOWN	; [351] RETURN SPACE USED BY TRANSIENT STRING
	CONCA8:	SOSG	.N(DL)		; [351] COUNT ONE MORE CHECKED
		 JRST	.EXIT(DL)	; [351] THEN RETURN
		SOJA	AX,CONCA6	; [351] REPEAT FOR EACH STRING
 REP 15/140	;08C10
		MOVE	AX,-1(AX)	; [335] GET FORMAL BITS
		MOVEM	AX,A01TMP(DB)	; [335] PUT THEM HERE UNTIL WE NEED THEM
 WIT
		PUSH	SP,-1(AX)	; [351] SAVE FORMAL BITS ON STACK
 REP 32/140	;08C11
		HLRZ	A0,A01TMP(DB)	; [335] GET FORMAL BITS INTO RIGHT HALF
		TRZ	A0,77		; [335] TURN OFF WHAT WE DON'T CARE ABOUT
		CAIE	A0,$PRO!$S	; [335] STATIC SIMPLE STRING PROC (USER PROC.)?
		CAIN	A0,$D!$EXP!$S	; [335] DYNAMIC SIMPLE STR EXPR (STR EXPRSION)?
		 JRST	LAB413		; [335] YES, GO DELETE IT
		CAIE	A0,$PRO!$S!$EXT	; [335] STATIC EXTERN STR PROC. (ALGLIB PROC.)?
		JRST	.EXIT(DL)	; [335] NO, EXIT BUT DON'T DELETE IT
 WIT
		POP	SP,A0		; [351] RESTORE FORMAL BITS
		TDZ	A0,[$P,,-1]	; [351] TURN OFF EXTRA BITS
		CAME	A0,[($PRO!$S!$EXT)] ; [351] STATIC EXT STR PROC (ALGLIB PROC.)?
		CAMN	A0,[($PRO!$S)]	; [351] STATIC SIMPLE STRING PROC (USER PROC.)?
		 JRST	LAB413		; [351] YES, GO DELETE IT
		CAME	A0,[($D!$S!$EXP)] ; [351] NO, DYNAMIC STRING EXPRESSION?
		 JRST	.EXIT(DL)	; [351] NO, EXIT
		TLC	A2,STRDYN!STRPRC ; [351] YES, AND IS IT DYNAMIC AND THE RESULT
		TLCE	A2,STRDYN!STRPRC ; [351] OF A STRING PROCEDURE?
		 JRST	.EXIT(DL)	; [351] NO, EXIT
 SUM 144767