Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/blis16/b16ch2.lst
There are no other files named b16ch2.lst in the archive.
B16CH2		OTS CH$ String Copy				25-Jan-1983 16:48:12	TOPS-20 Bliss-16 2A(530)	    Page   1
								25-Jan-1983 16:43:43	NETPKG:<BLIS16>B16CH2.B16.1 (1)

;	  0001	MODULE B16CH2 (IDENT = '2-4' %TITLE'OTS CH$ String Copy'
;	  0002		       ,LANGUAGE(BLISS16)
;	  0003		      ) =
;	  0004	BEGIN
;	  0005	
;	  0006	!
;	  0007	!         COPYRIGHT (c) 1977,1978,1979,1980,1981,1982 BY
;	  0008	!         DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;	  0009	!
;	  0010	! This software is furnished under a license and may be used and  copied
;	  0011	! only  in  accordance  with  the  terms  of  such  license and with the
;	  0012	! inclusion of the above copyright notice.  This software or  any  other
;	  0013	! copies  thereof may not be provided or otherwise made available to any
;	  0014	! other person.  No title to and ownership of  the  software  is  hereby
;	  0015	! transferred.
;	  0016	!
;	  0017	! The information in this software is subject to change  without  notice
;	  0018	! and  should  not  be  construed  as  a commitment by DIGITAL EQUIPMENT
;	  0019	! CORPORATION.
;	  0020	!
;	  0021	! DIGITAL assumes no responsibility for the use or  reliability  of  its
;	  0022	! software on equipment which is not supplied by DIGITAL.
;	  0023	!
;	  0024	
;	  0025	!++
;	  0026	! FACILITY:
;	  0027	!   Bliss-16 (and Bliss-16C/Bliss-11) Object Time System (OTS)
;	  0028	!
;	  0029	! ABSTRACT:
;	  0030	!   Implements CH$COPY.
;	  0031	!
;	  0032	!--
;	  0033	!   
;	  0034	!
;	  0035	! ENVIRONMENT:
;	  0036	!   May be compiled with /ENVIRONMENT:EIS or /ENVIRONMENT:NOEIS
;	  0037	!
;	  0038	! AUTHOR: %(/**/)%, CREATION DATE: %(/**/)%
;	  0039	!
;	  0040	! MODIFIED BY:
;	  0041	!
;	  0042	! 1.	13-SEP-77	JAH	CONVERT INCR'S TO DECR'S TO CREATE MORE EFFICIENT CODE.
;	  0043	!
;	  0044	! 2.	4-MAY-79	JAH	ADD ADDITIONAL ENTRY POINT.
;	  0045	!
;	  0046	! 3.	13-FEB-80	DGF	BROUGHT INTO CONFORMANCE WITH SOFTWARE STANDARDS.
;	  0047	!
;	  0048	! 4.	18-FEB-80	DGF	MOVE BLISS-11 ENTRY POINTS TO B16B11
;	  0049	!--
;	  0050	!
;	  0051	! TABLE OF CONTENTS:
;	  0052	!
B16CH2		OTS CH$ String Copy				25-Jan-1983 16:48:12	TOPS-20 Bliss-16 2A(530)	    Page   2
2-4								25-Jan-1983 16:43:43	NETPKG:<BLIS16>B16CH2.B16.1 (1)

;	  0053	
;	  0054	FORWARD ROUTINE
;	  0055	    BL$CPY;
;	  0056	
;	  0057	FIELD
;	  0058	    STGDESC = SET
;	  0059		STGLEN = [1, 0, 16, 0],	! LENGTH OF THE STRING
;	  0060		STGPTR = [0, 0, 16, 0]	! POINTER TO THE STRING
;	  0061		TES;
;	  0062	
;	  0063	MACRO
;	  0064	    BLANK=%NAME(' ')(WRITE,EXECUTE,LOCAL,CONCATENATE) %,
;	  0065	    ELIF=ELSE IF%;
;	  0066	
;	  0067	PSECT
;	  0068	    CODE=BLANK,
;	  0069	    PLIT=BLANK,
;	  0070	    OWN=BLANK;
B16CH2		OTS CH$ String Copy				25-Jan-1983 16:48:12	TOPS-20 Bliss-16 2A(530)	    Page   3
2-4								25-Jan-1983 16:43:43	NETPKG:<BLIS16>B16CH2.B16.1 (2)

;	  0071	GLOBAL ROUTINE BL$CPY(FILLCODE,DLEN,DEST,NARGS) =		    !(2)
;	  0072	!+
;	  0073	! FUNCTIONAL DESCRIPTION:
;	  0074	!    COPIES A VARIABLE NUMBER OF STRINGS INTO ONE DESTINATION
;	  0075	!    STRING.
;	  0076	!
;	  0077	! INPUTS:
;	  0078	!    ANY NUMBER OF PAIRS, LENGTH:POINTER DESCRIBING THE
;	  0079	!		SOURCE STRINGS.
;	  0080	!    FILLCODE:	A CHARACTER TO PAD THE DESTINATION WITH.
;	  0081	!    DLEN:	LENGTH OF THE DESTINATION STRING.
;	  0082	!    DEST:	POINTER TO THE DESTINATION STRING.
;	  0083	!    NARGS:	MINUS THE NUMBER OF ACTUALS, PLUS ONE.
;	  0084	!
;	  0085	! VALUE:
;	  0086	!    POINTER TO THE CHARACTER JUST OFF THE END OF THE STRING.
;	  0087	!-
;	  0088	    BEGIN
;	  0089	
;	  0090	    LOCAL
;	  0091		REMLEN,		! REMAINING DESTINATION LOCATIONS
;	  0092		SPTR,		! SOURCE POINTER
;	  0093		DPTR,		! DESTINATION POINTER
;	  0094		NSTGS,		! COUNT OF SOURCE STRINGS
;	  0095		STG: REF BLOCK FIELD(STGDESC);	! SOURCE DESCRIPTOR.
;	  0096	
;	  0097	    NSTGS = (-.NARGS-3) ^ (-1);	! COMPUTE NUMBER OF SOURCES. (2)
;	  0098	
;	  0099	    STG = FILLCODE+.NSTGS*4-2;	! FIND FIRST SOURCE.
;	  0100	
;	  0101	    REMLEN = .DLEN;		! INITIALIZE.
;	  0102	    DPTR = .DEST;
;	  0103	
;	  0104	    DECR K FROM .NSTGS TO 1 DO											      !(1)
;	  0105		BEGIN
;	  0106		SPTR = .STG[STGPTR];
;	  0107		DECR I FROM .STG[STGLEN] TO 1 DO									      !(1)
;	  0108		    BEGIN
;	  0109		    REMLEN = .REMLEN-1;
;	  0110		    IF .REMLEN LSS 0 THEN RETURN .DPTR;
;	  0111		    CH$WCHAR_A(CH$RCHAR_A(SPTR), DPTR)
;	  0112		    END;
;	  0113		STG = .STG-4
;	  0114		END;
;	  0115	
;	  0116	    RETURN CH$FILL(.FILLCODE,.REMLEN,.DPTR)
;	  0117	
;	  0118	    END;


						.TITLE	B16CH2 OTS CH$ String Copy
						.IDENT	/2.4/
B16CH2		OTS CH$ String Copy				25-Jan-1983 16:48:12	TOPS-20 Bliss-16 2A(530)	    Page   4
2-4								25-Jan-1983 16:43:43	NETPKG:<BLIS16>B16CH2.B16.1 (2)


						.SBTTL	BL$CPY
000000						.PSECT	.

000000	004167  000000G			BL$CPY::JSR	R1,$SAVE5			;					0071
000004	012700  177775 				MOV	#-3,R0				;					0097
000010	166600  000016 				SUB	16(SP),R0			; NARGS,*
000014	010002 					MOV	R0,R2				; *,NSTGS
000016	006202 					ASR	R2				; NSTGS
000020	010200 					MOV	R2,R0				; NSTGS,*				0099
000022	006300 					ASL	R0
000024	006300 					ASL	R0
000026	012701  000024 				MOV	#24,R1
000032	060601 					ADD	SP,R1				; FILLCODE,*
000034	060100 					ADD	R1,R0
000036	010005 					MOV	R0,R5				; *,STG
000040	162705  000002 				SUB	#2,R5				; *,STG
000044	016604  000022 				MOV	22(SP),R4			; DLEN,REMLEN				0101
000050	016603  000020 				MOV	20(SP),R3			; DEST,DPTR				0102
000054	010200 					MOV	R2,R0				; NSTGS,K				0104
000056	003415 					BLE	5$
000060	011501 				1$:	MOV	(R5),R1				; STG,SPTR				0106
000062	016502  000002 				MOV	2(R5),R2			; *(STG),I				0107
000066	003406 					BLE	4$
000070	005304 				2$:	DEC	R4				; REMLEN				0109
000072	100002 					BPL	3$				;					0110
000074	010300 					MOV	R3,R0				; DPTR,*
000076	000207 					RTS	PC
000100	112123 				3$:	MOVB	(R1)+,(R3)+			; SPTR,DPTR				0111
000102	077206 					SOB	R2,2$				; I,*					0000
000104	162705  000004 			4$:	SUB	#4,R5				; *,STG					0113
000110	077015 					SOB	R0,1$				; K,*					0000
000112	016646  000024 			5$:	MOV	24(SP),-(SP)			; FILLCODE,*				0116
000116	010446 					MOV	R4,-(SP)			; REMLEN,*
000120	010346 					MOV	R3,-(SP)			; DPTR,*
000122	004767  000000G				JSR	PC,BL$FIL
000126	062706  000006 				ADD	#6,SP				;					0071
000132	000207 					RTS	PC

; Routine Size:  46 words,	Routine Base:  . + 0000
; Maximum stack depth per invocation:  10 words


;	  0119	
;	  0120	
;	  0121	END ELUDOM



;					OTS external references
						.GLOBL	$SAVE5, BL$FIL
B16CH2		OTS CH$ String Copy				25-Jan-1983 16:48:12	TOPS-20 Bliss-16 2A(530)	    Page   5
2-4								25-Jan-1983 16:43:43	NETPKG:<BLIS16>B16CH2.B16.1 (2)


;					PSECT SUMMARY
;
;	Psect Name			Words	  Attributes
;	 .				   46	    RW ,  I  ,  LCL,  REL,  CON





; Size:		46 code + 0 data words
; Run Time:	00:01.0
; Elapsed Time:	00:01.3
; Memory Used:	9 pages
; Compilation Complete