Google
 

Trailing-Edge - PDP-10 Archives - bb-d549g-sb - scdexe.mac
There are 6 other files named scdexe.mac in the archive. Click here to see a list.
	TITLE SCDEXE



;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1979,1980 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
; 
; Note:  The version for SCDSET is stored here since no facility to
; set .JBVER exists in FORTRAN.

VERSCD==3
WHOSCD==0
PATSCD==1
EDTSCD==12

.JBVER==137
	LOC	.JBVER
	INTERNAL .JBVER
	BYTE	(3)WHOSCD (9)VERSCD (6)PATSCD (18)EDTSCD
	RELOC

; THIS PROGRAM EXECUTES THE SCHED. UUO FOR THE ARGUMENTS
; SET UP IN A, AND ARRAY D.  IT ONLY EXECUTES AND RETURNS A VALUE.
; IT IS INTENDED AS A FORTRAN (4 OR 10) SUBROUTINE THAT EXPECTS
; NO (REPEAT NO) ARGUMENTS AND TAKES IN COMMON A, B, D.
;
; IT SETS B TO THE ERROR CODE OF THE SCHED. UUO IF THE UUO FAILS.
; B IS SET TO ZERO OTHERWISE.

	SCHED.=CALLI 150		;WHEN WILL MACRO EVER KNOW?
	EXTERNAL .COMM.			;FORTRAN COMMON
	A=.COMM.
	B=.COMM.+1
	D=.COMM.+2
	ENTRY SCDEXE

SCDEXE::CAIA			;THIS IS FOR FORTRAN 4-10
	PUSH	17, [EXSCHD]		;SO IS THIS
	SETZM	B			;CLEAR B
	PUSH	17, A			;SAVE A FOR FORTRAN CODE
	HRL	0, A
	HRRI	0, D			;GET [ LH(A),, D ] INTO A
	MOVEM	0, A
	HRLI	0, 1			;GET  [1,,A] INTO 0 FOR THE CALL
	HRRI	0, A
	SCHED.				;DO UUO
	MOVEM	0, B			;PUT ERROR CODE IN B
	POP	17, A			;NOW RESTORE A.
	POPJ	17,			;RETURN FORTRAN 10 STYLE


EXSCHD:	JRA	16, (16)		;RETURN FORTRAN 4 STYLE
; THIS FORTRAN CALLABLE ROUTINE RETURNS IN A THE JOB NUMBER
; OF THE JOB.  THERE ARE NO ERROR RETURNS, OR VALUES EXPECTED.

MYJOB::	CAIA				;FORTRAN CALLABLE ROUTINE
	PUSH	17, [EXSCHD]		;TO RETURN CALLER'S JOB #
	PJOB				;DO THE UUO
	MOVEM	0, A			;STORE IN A
	POPJ	17,			;RETURN




; THIS ROUTINE IS A GENERAL GETTAB EXECUTER.  IT EXPECTS IN A
; THE VALUE OF THE AC FOR THE GETTAB. IT RETURNS THE ANSWER IN
; A, AND SETS B TO SOME NON-ZERO VALUE IF THERE IS AN ERROR


TABGET::CAIA				;FOR FORTRAN
	PUSH	17, [EXSCHD]
	SETZM	B			;CLEAR ERROR FLAG
	MOVE	0, A			;GET THE ARGUMENT INTO 0
	GETTAB				;DO THE UUO
	   SETOM B			;UUO FAILED
	MOVEM	0, A			;STORE THE ANSWER IN A
	POPJ	17,			;RETURN


	LIT
	END