Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99m-bb - forchr.c19
There are 9 other files named forchr.c19 in the archive. Click here to see a list.
 REP 3/1	;19C1
		TV	FORCHR Character routines, 10(4106)
		SUBTTL	BL/AHM/TFV/CKS/RVM/PLB/TJK/CDM/MRB			2-Feb-84
 WIT
		TV	FORCHR Character routines, 11(5036)
		SUBTTL	BL/AHM/TFV/CKS/RVM/PLB/TJK/CDM/MRB/RLF		6-Oct-87
 REP 1/45	;19C2
		TITLE	SAVAC%-RESAC%	Save and restore registers routine

		SEARCH	MTHPRM,FORPRM
		FSRCH
		SEGMENT	CODE

		ENTRY	SAVAC%, RESAC%
 WIT
		TITLE	CHRSTK - Character stack routines
 DEL 15/45	;19C3
	;	SAVAC% is used in conjunction with RESAC%. SAVAC% should be  the
	;	first stack  operation  performed  by  the  string  sub-routine.
	;	SAVAC% saves  registers  2-15 on  the  stack, beginning  at  the
	;	location pointed to by the  stack- pointer. SAVAC% returns  with
	;	all registers intact except T1 & P.
	;
	;	Upon completion of string operation, a PJRST to RESAC%  restores
	;	registers 2-15 and POPJ's to next higher-level caller.

		FIRST==2		;[3242] First AC to save
		LAST==15		;[3242] Last AC to save

	SAVAC%:	MOVEM	LAST,ACS+LAST	;[3242] Save LAST
		MOVE	LAST,[FIRST,,ACS+FIRST] ;[3242] Point to the start of the block
		BLT	LAST,ACS+LAST-1	;[3242] Save FIRST:LAST-1
		POPJ	P,		;[3242] Return to library routine

	RESAC%:	MOVS	LAST,[FIRST,,ACS+FIRST] ;[3242] Point to the AC save block
		BLT	LAST,LAST	;[3242] Restore FIRST:LAST
		GOODBYE			;Return to user routine

		SEGMENT	DATA
	ACS==.-FIRST
		BLOCK	LAST-FIRST+1	;[3242] Place to save the ACs
		SEGMENT	CODE

		PRGEND

		TITLE	CHRSTK - Character stack routines

	;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
	;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

	;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1981, 1987
	;ALL RIGHTS RESERVED.

 INS 88/56	;19C4
		PRGEND			;[5036]

		
	;[5036] This routine is moved down here so none of the above
	;[5036] routines that calls SAVAC% or RESAC% will get undefined
	;[5036] global symbols

		TITLE	SAVAC%-RESAC%	Save and restore registers routine

		SEARCH	MTHPRM,FORPRM
		FSRCH
		SEGMENT	CODE

		ENTRY	SAVAC%, RESAC%

	;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
	;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

	;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1981, 1987
	;ALL RIGHTS RESERVED.

	;	SAVAC% is used in conjunction with RESAC%. SAVAC% should be  the
	;	first stack  operation  performed  by  the  string  sub-routine.
	;	SAVAC% saves  registers  2-15 on  the  stack, beginning  at  the
	;	location pointed to by the  stack- pointer. SAVAC% returns  with
	;	all registers intact except T1 & P.
	;
	;	Upon completion of string operation, a PJRST to RESAC%  restores
	;	registers 2-15 and POPJ's to next higher-level caller.

		FIRST==2		;[3242] First AC to save
		LAST==15		;[3242] Last AC to save

	SAVAC%:	MOVEM	LAST,ACS+LAST	;[3242] Save LAST
		MOVE	LAST,[FIRST,,ACS+FIRST] ;[3242] Point to the start of the block
		BLT	LAST,ACS+LAST-1	;[3242] Save FIRST:LAST-1
		POPJ	P,		;[3242] Return to library routine

	RESAC%:	MOVS	LAST,[FIRST,,ACS+FIRST] ;[3242] Point to the AC save block
		BLT	LAST,LAST	;[3242] Restore FIRST:LAST
		GOODBYE			;Return to user routine

		SEGMENT	DATA
	ACS==.-FIRST
		BLOCK	LAST-FIRST+1	;[3242] Place to save the ACs
					;[5036] PRGEND removed

 SUM 46361