Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0082/sysjo.mac
There are no other files named sysjo.mac in the archive.
TITLE SYSJO TO REPLACE FORTRAN LIB ROUTINE
SUBTTL PAUL ROBINSON, WESLEYAN UNIV, JULY 1980
COMMENT \
	THIS ROUTINE WAS WRITTEN TO ACT IN THE PLACE OF THE FORTRAN
	LIBRARY ROUTINE SYSJO DESCRIBED IN THE PLOT DOCUMENTATION.
	THIS ROUTINE RETURNS AN ASCII PPN IN BRACKETS; REQUIRES A 3-WORD
	ARGUMENT. I.E.
		DIMENSION IJOB(3)
		CALL SYSJO (IJOB)
	THIS ROUTINE WORKS ON A DEC-SYSTEM 2060 RELEASE 4 MONITOR.
	\
	SEARCH MONSYM
	A=1	;A AND B ARE JSYS ARG ACS
	B=2
	T1=11	;TEMPS
	T2=12
	CNT=13	;COUNTER
	DEST=14	;DEST AND SRC ARE COPIES OF BYTE POINTERS TO SUBROU. ARG
	SRC=15	;AND AC2, RESPECTIVELY
	L=16	;FORTRAN ARG BLOCK POINTER
	P=17	;STACK POINTER

	ENTRY SYSJO
SYSJO:	MOVE	DEST,[POINT 7,0]	;BUILD UP A BYTE POINTER
	HRRI	DEST,@0(L)	;WITH EXACT ADR IN IT
	MOVE	SRC,[POINT 3,B]	;GET POINTER TO AC2
	MOVEI	T1,@0(L)	;GET FORTRAN ARG ADR
	HRLI	T1,-3		;WANT 3 WORDS
	SETZM	(T1)		;CLEARED
	AOBJN	T1,.-1
	GJINF			;GET DIR # IN AC2 (AMONG OTHER THINGS)
	MOVE	A,B		;PUT IT INTO A FOR NEXT CALL
	STPPN			;TRANSLATE DIR # TO PPN (RETURNED IN B)
	MOVEI	T2,"["		;START WITH BRACKET
	IDPB	T2,DEST		;PUT INTO STRING
	MOVEI	CNT,6		;WANT 6 DIGITS 
	ILDB	T1,SRC		;GET OCTAL DIGIT
	SOSE	CNT		;COUNT IT, LOAD 6TH ANYWAY
	JUMPE	T1,.-2		;ELIMINATE LEADING ZEROS
ASC:	ADDI	T1,"0"		;CONVERT NUM TO ASCII
	IDPB	T1,DEST		;DUMP IT IN
	ILDB	T1,SRC		;GET NEXT DIGIT
	SOJGE	CNT,ASC		;UP TO 6
	MOVEI	T2,","		;COMMA BETWEEN HALVES
	IDPB	T2,DEST		;PUT IT IN
	SKIPA	CNT,[XWD 6]	;RESET COUNT, DON'T MISS A DIGIT
	ILDB	T1,SRC		;GET NEXT DIGIT
	SOSE	CNT		;LOAD 6TH ANYWAY
	JUMPE	T1,.-2		;ELIMINATE LEADING ZEROS
ASC2:	ADDI	T1,"0"		;ASCIIZE
	IDPB	T1,DEST		;DUMP
	ILDB	T1,SRC		;LOAD
	SOJGE	CNT,ASC2	;UP TO 6
	MOVEI	T2,"]"		;CLOSE BRACKET AT THE END
	IDPB	T2,DEST
	POPJ	P,		;ALL DONE
	END