Google
 

Trailing-Edge - PDP-10 Archives - scratch - 10,7/unscsp/sysinf/infsym.mac
There are 5 other files named infsym.mac in the archive. Click here to see a list.
	UNIVERSAL	INFSYM
	SUBTTL	[SYSTEM]INFO SYMBOLS
	SUBTTL	T KORTEWEG 23-APRIL-1974/DD 1978

	SEARCH	UUOSYM,MACTEN			; [105] FIX SEARCHES

VWHO==0
VSYMB==0
VMINOR==0
VEDIT==105

;EDITS MADE FROM VERSION 1 TILL 101

;1 FIX ETERNAL LOOP DUE TO TURNED AROUND MESSAGES GOING TO
;  A DISAPPEARED ORIGIN.THIS CAUSED [SYSTEM]INFO TO SEND TO SYSTEM 
;  INFO

;2 IILEGAL UUO'S WERE REPORTED WHEN A USER USED A PID OBTAINED
;  INDEPENDENTLY FROM 	SYSTEM]INFO

;3 IGNORE ERRORS CAUSED BY A LOGGED OUT JOB FOR WHICH A IPCF REQUEST
;  WAS MADE

;4 THROW  AWAY PAGES SENT BY ANNOYING USERS

;102	FIX INCORRECT DEFINITIONS OF EJECND AND NXMCND FOR ERROR TRAPPING
;103	CHANGE ALL REFERENCES TO UNIVERSAL FILE C TO BE UUOSYM.
;104	CHANGE NM.NAM TO BE 10 OCTAL.
;105	CHANGE ALL C.UNV REFERENCES TO UUOSYM & MACTEN
;	ALSO COMMENT OUT ANY DUPLICATE DEFINITIONS SPR 10-29964


;COPYRIGHT (C) 1974 BY DIGITAL EQUIPMENT CORPORATION , MAYNARD , MASS.


;REGISTER USAGE
T1=1				;FIVE SCRATCH REGISTERS
T2=2				;THESE REGISTERS CAN BE USED
T3=3				;ANYWHERE
T4=4				;
T5=5				;
V=6				;VALUE REGISTER OR ARGUMENT REGISTER (T1 EXT ENDS V)
L=7				;LIST ADDRESS FOR LIST PROCESSES
L1=10				;SECOND LIST ADDRESS
W=11				;WORK BUCKET ADDRESS
M=12				;MESSAGE BLOCK ADDRESS
U=13				;BLOCK USED TO SEND REQUESTS TO IPCF AND AN ANSWER TO THE REQUESTER
J=14				;JOB # OF JOB BEING PROCESSED
PS=15				;TASK STATUS
P1=16				;PRESERVED PARAMETER!
P=17				;PUSH DOWN LIST POINTER

;VARIOUS CHARACTERS
.CHSPC=40
.CHLPAR=50
.CHRPAR=51
.CHCOM=54
.CHMIN=55
.CHZRO=60
.CHNIN=71
.CHLSQ=74
.CHRSQ=76
.CHA=101
.CHO=117
.CHR=122
.CHS=123
.CHT=124
.CHLBR=133
.CHBSL=134
.CHRBR=135
.CHARR=136
;DEFAULT VALUES AND PARAMETERS

	ND	STKLEN,400	;LENGTH OF STACK
	ND	PPNLOW,7	;USED TO CHECK PRIVILEGED PPN'S
	ND	NM.NAM,10	;[104] LENGTH OF NAMES (MAXIMUM)
	ND	FTFLOW,0	;DEBUGGING IS OFF !!
;DO NOT ASEMBLE WITH FEATURE ON THIS GIVES TROUBLE
	ND	FTDEBUG,0	;NO DEBUGGING IS STANDARD
;MESSAGE FIELD DEFINITIONS

	DEFINE	IP.CRE(T)<[POINT 6,BL.UU0(T),29]>
	DEFINE	IP.CMF(T)<[POINT 3,BL.UU0(T),35]>

;MONITOR SYMBOLS

IP.PDL=40000			;FLAG STAING THAT JOB LOGS OUT
JACCT==1B17			;JOB IS PRIVILEDGED.
ERRJB=14			;TEMPORARY FLUSH IF PID FAILED
				;DURING LOGOUT CALL
;SYMBOL DEFINITIONS

..LRG==777777	;A VERY LARGE CONSTANT
SIGN=1B0	;THE SIGN BIT OF A PDP-10 WORD
BITS8==377	;MASK TO TEST ASCIZ
PAKLEN=NM.NAM+2	;LENGTH OF MESSAGE PACKAGES
$FATAL==1		;FATAL ERROR
$IGNO==2		;IGNORE THE ERROR
$DELAY==3		;DELAY THE REQUEST

;TIMING CONSTANTS USED TO PREVENT LOOPING ON RERUNNING THE PROGRAM
;WITH RESTAR CALLS

DAEDIF==^D10*^D60*^D1000	;TEN MINUTES BETWEEN RERUNS
INFDIF==^D10*^D60*^D1000	;TEN MINUTES FOR SYSINF

;OFFSETS IN MODULE INITILIZATION BLOCK

.BLKOF==0		;RERUN PARAMETER BLOCK 3 WORDS
			;1. PASSWORD
			;2. SEQ NUMBER RETURNED BY RUNNUM
			;3. DELTA TIME USE TO PREVENT RUN LOOP
			;   SELECTABLE BY USER

.DEVOF==3		;3 WORD OPEN BLOCK FOR CRASH FILE

.FILOF==6		;4 WORD ENTER BLOCK NAMES WILL GET
			;A 3 WORD SEQ # APPENDED

.PREOF==12		;PREFIX TO BE PRINTED ON EACH MESSAGE LINE

;LIST PARAMETERS

LI.LNK==0		;LINK WORD OF LIST CONTROL BLOCK
LI.NUM==1		;NUMBER OF ITEMS IN LIST
;NFOSTS CONTAINS THE STATUS OF [SYSTEM]INFO
;IF THE STATUS IS ZERO AN EXIT IS SUFFICIENT TO TERMINATE ITS SERVICE

NF.DWN==1B0		;[SYSTEM]INFO IS NOT UP DO NOT ACCEPT ANY CALLS
NF.NFO==1B1		;THE [SYSTEM]INFO STATUS HAS BEEN REQUIRED
NF.PID==1B2		;A PID HAS BEEN ACQUIRED

;EACH JOB HAS ASSOCIATED A STATUS WORD ADDRESSED INDIRECTLY VIA
;JOBSTS AND REGISTERS
;THE LEFT HALF CONTAINS STATUS BITS
;THE RIGHT HALF:
;THE MAXIMUM OF PIDS  FOR THE JOB IN BITS 18-26
;THE USED NUMBER OF PIDS IN BITS 27-35

JS.IPC=1B0		;JOB HAS ONE OR MORE PID'S TILL LOGOUT
JS.PIR=1B1		;JOB HAS ONE OR MORE PID'S TILL NEXT RESET
JS.DLY=1B2		;JOB HAS A DELAYED REQUEST
JS.SND=1B3		;SENDS ADDRESSED TO JOB ARE WAITING
JS.WAI=1B4		;JOB HAS REQUESTS PENDING DUE TO DELAYING
			;OF A PREVIOUS JOB

;FLAGS IN A TASKS PROCESS STATUS
;THESE FLAGS ARE SAVED IN ENTRY BL.FLG OF THE MESSAGE BLOCK
;THIS FLAGS REPRESENT THE STATUS OF THE TASK.
;A SUBSET WILL BE USED TO IDENTIFY NAMES
;NOTE: ALL NAME ATTRIBUTES MUST BE  IN THE LEFT HALF

FL.LBR==1B1		;(TEMPORARY) USED BY PARSER LEFTSQUARE BRACKET SEEN
FL.LFW=1B2		;(NAME ATTR.) PPN HAS A WILD PROJECT
FL.NAM=1B3		;(NAME ATTR.) PPN FIELD IS A NAME
FL.PPN=1B4		;(NAME ATTR.) PPN FIELD IS NO NAME
FL.RBR=1B7		;(TEMPORARY) USED BY PARSER A RIGHT SQUARE BRACKET HAS BEEN SEEN
FL.RFW=1B9		;(NAME ATTR.) PROGRAMMER FIELD IS WILD
FL.RST=1B10		;(TASK ATTR.) TASK EXECUTES RESET TYPE OF REQUEST
FL.DLY=1B11		;(TASK ATTR.) TASK CALLED A DELAY FROM TASK CALL LEVEL
FL.INV=1B12		;(TEMPORARY) NAME IS INVISIBLE  CLAIM A NAME
			;DURING THE DELAY OF AN ASSIGN REQUEST.ONLY
			;ASSIGNS ARE SO CLAIRVOYANT TO SEE THE NAME
	SUBTTL	TASK BLOCK DEFINITIONS

;M BLOCK . THIS REGISTER CONTAINS EFFECTIVELY THE UUO BLOCK DATA
;	  OF THE INCOMING MESSAGE

XX=.
	DEFINE	.SLISZ
<	IFNDEF	LI.SIZ,<LI.SIZ=.>
IFG	<.-LI.SIZ>,<LI.SIZ=.>
>
	RELOC	0
	PHASE	0
BL.LNK:	Z		;LINK WORD FOR MAIN Q
BL.SLN:	Z		;SUBLINK FOR THE TASKS DATA BLOCKS
			;A(M DATA PACKET),,A(W BLOCK)
BL.XTR:	Z		;ZERO OR JOB # MESSAGE SENDER
BL.PCO:	Z		;CONTINUE PC FOR A SUSPENDED PROCES
BL.PCR:	Z		;RETURN ADDRESS OF THE SUSPENDED PROCES
BL.FLG:	Z		;PROCES FLAGS
BL.UU0:	Z		;WORD 0 OF UUO BLOCK
BL.UU1:	Z		;SENDER OF MESSAGE
BL.UU2:	Z		;RECEIVER OF MESSAGE
BL.UU3:	Z		;LENGTH,,ADDRESS OF MESSAGE ADDRESS IS WRONG!
	.SLISZ
	DEPHASE

;M DATA BLOCK LAY OUT

	RELOC	0
	PHASE	0
BL.LNK:	Z		;NOT USED
BL.SLN:	Z		;0 OR LINK TO TASKS MOST RECENT IPCF REPLY
BL.XTR:	Z		;PUSH DOWN LIST VALUE ON THE DISPATCH
			;TO THE FUNCTION,THIS IS TO RECOVER FROM 
			;ERRORS REPORTED TO A JOB
BL.COD:	Z		;WORD 0 OF MESSAGE DATA
BL.PID:	Z		;WORD 1 OF MESSAGE DATA
BL.STR:	BLOCK	NM.NAM	;STRING FIELD
	.SLISZ
	DEPHASE

;REPLY BLOCK LAY OUT
;IDENTICAL TO THE M DATA BLOCK

;W BLOCK (WORK BLOCK LAY OUT) (USED AS A NAME BLOCK

	RELOC	0
	PHASE	0
BL.LNK:	Z		;UNUSED
BL.SLN:	Z		;ADDRESS OF USER BLOCK IF PRESENT
BL.XTR:	Z		;NAME FLAGS,,LENGTH OF NAME FIELD IN WORDS
BL.PPN:	Z		;PPN OF NAME FIELD
BL.PID:	Z		;PID WHICH GOES WITH NAME
BL.STR:	BLOCK	NM.NAM	;STRING WHICH CONTAINS CANONICAL NAME
	.SLISZ
	DEPHASE
;W USED AS AS A SAVE BLOCK

	RELOC	0
	PHASE	0
BL.LNK:	Z
BL.SLN:	Z
BL.XTR:	Z
BL.T1:	Z		;USED TO SAVE T1
BL.T2:	Z		;USED TO SAVE T2
BL.T3:	Z		;USED TO SAVE T3
	.SLISZ
	DEPHASE


;U BLOCK USER BLOCK USED TO SEND TO USER

;LAY OUT AS MDATA BLOCK

;REPLY BLOCK LAY OUT

	RELOC	0
	PHASE	0
BL.LNK:	Z		;UNUSED
BL.SLN:	Z		;UNUSED
BL.XTR:	Z		;USED TO STORE IPCF VALUE
			;ALSO USED AS BL.PCR BY DELAYC
BL.COD:	Z		;WORD 0 OF REPLY
BL.PID:	Z		;WORD 1 OF REPLY
BL.WD2:	Z		;WORD2 OF REPLY
	.SLISZ
	DEPHASE

	RELOC	XX
	PURGE	XX
;
;	[105]	REMOVE ALL DUPLICATE DEFINITIONS OF SYMBOLS
;
;	SUBTTL	C FILE FUTURISTICS
;
;	DEFINE	.BC(TXT)
;<	IFDEF	NEWC,<PRINTX TXT>>
;
;;DUPLICATE C SYMBOLS
;
;HB.IPC==1B10
;IPCNP%==3
;.IPCFN==1
;.IPCSS==15
;.IPCSJ==11
;.IPCSC==6
;.IPCSW==14
;	OPDEF	IPCFS.	[CALLI	143]
;	OPDEF	IPCFR.	[CALLI	142]
;IP.CFB==1B0	;DO NOT BLOCK DURING IPCFR.
;IP.TTL==1B4	;TRUNCATE PACKET
;.IPCSZ==5
;IPCNN%==76
;IPCBP%==74
;IPCQP%==73
;IPCDN%==75
;IPCPF%==20
;IPCPI%==15
;
;IPCNN%==76
;IPCBN%==77
;IPCCF%==71
;IPCFF%==72
;IPCUF%==16
;.IPCSF==4
;.IPCSQ==7
;%IPCFP==5,,77
;%IPCMP==7,,77
;%IPCPM==6,,77
;F%PI==1B24
;F%IPCF==1B25
;DEFINE A PROGRAMS VERSION
;STANDARD SYMBOLS ARE ASSUMED:
;VMAJOR MAJOR VERSION NUMBER
;VEDIT  EDIT NUMBER
;VMINOR MINOR VERSION NUMBER
;VWHO   WHO DID IT

	DEFINE	PVER
<...ZZZ=.
.JBVER=137
	LOC	.JBVER
	BYTE	(3)VWHO(9)VMAJOR(6)VMINOR(18)VEDIT
	RELOC	...ZZZ
>

;END MACRO FOR LIBRARY MODULES

	DEFINE	ENDMOD
<	XLIST
	LIT
	LIST
>	;END OF ENDMOD
	DEFINE	RESTORE(LIST)
<	IRP	LIST<
	IFIDN	<ALL><LIST>,
<	RESTORE	<17,16,15,14,13,12,11,10,7,6,5,4,3,2,1>
> ;; END OF IFIDN
	IFDIF	<ALL><LIST>,
<	POP	P,LIST
> ;;	END OF IFDIF
> ;;	END OF IRP
> ;;	END OF DEFINE

	DEFINE	CALL(NAME)
<	PUSHJ	P,NAME
>

	DEFINE	RETURN
<	POPJ	P,
>

	DEFINE	SKIPR
<	AOS	(P)
	POPJ	P,
>

	DEFINE	SAVE(LIST)
<	IRP	LIST<
	IFIDN	<ALL><LIST>,<	SAVE	<1,2,3,4,5,6,7,10,11,12,13,14,15,16,17>
> ;;	END OF IFIDN
	IFDIF	<ALL><LIST>
<	PUSH	P,LIST
> ;;	END OF IFDIF
> ;;	END OF IRP
> ;;	END OF DEFINE

	DEFINE	SAVEI(LIST)
<	IRP	LIST<
	PUSH	P,[LIST]
>>

	DEFINE	SIXWRD	(W)
<	EXP	SIXBIT /W/	;;ONLY ONE WORD
>

	DEFINE	ZERO(S,L)
<	SETZM	S
	HRLZI	T1,S
	HRRI	T1,S+1
	BLT	T1,L
>
;INTERRUPT VALUE DEFINITIONS

ILUCND==-5		;AN ILLEGAL UUO CONDITION
ILMCND==-6		;ILLEGAL MEMORY REFERENCE
ADCCND==-7		;ADDRESS CHECK
PDLCND==-11		;PUSH DOWN LIST PROBLEM
NXMCND==-13		;NON EXISTANT MEMORY
EJECND==-16		;EXTERNAL ERROR IN JOB

;INTERRUPT DATA

;.INTV START UP INTERRUPT VECTOR

	DEFINE	INTV
<.INTVC::
>

;.ENABLE XXX ENABLE LIST XXX CONDITIONS

	DEFINE	.ENABL(XXX)
<	IRP	XXX,<
	INTERN	XXX'OFF		;GIVE ACCESS TO THE VALUE
	GLOB	XXX'INT
XXX'OFF=.-.INTVC		;OFFSET FROM VECTOR BASE
XXX'NPC::	XXX'INT
XXX'OPC::	Z
XXX'WHY::	Z
XXX'STS::	Z
>	;;END OF IRP
>	;;END OF DEFINE

;SETINT GENEARTES A SET OF CALLS FOR INTERRUPTS TO
;BE ENABLED

	DEFINE	SETINT(XXX)
<	IRP	XXX,<
	.STINT(XXX)
>>	;;END OF IRP AND DEFINE
;.STINT CALLS A SUBROUTINE ,WHO WILL SET FOR THE
;LIST XXX OFF INTERRUPTS THE INTERRUPT VECTOR

	DEFINE	.STINT(XXX,%L,%L1)
<	
	EXTERN	XXX'ENB
	CALL	XXX'ENB		;;SET THE INTERRUPT
	SKIPA			;YOU LOOSE BOY
	JRST	%L		;;BUT YOU WIN
	MOVEI	V,%L1
	CALL	TYPOPR##
	JFCL
	RETURN
%L1:	ASCIZ	/XXX' INTERRUPT COULD NOT BE ENABLED
/
%L:
>	;END OF DEFINE SETINT

;DOINT EXPAND TO CODE TO ENABLE XXX

	DEFINE	DOINT(XXX)
<	INTERN	XXX'ENB

XXX'ENB:	HRREI	T2,XXX'CND
	MOVSI	T3,XXX'OFF##
	SETZM	T4
	MOVE	T1,[1B2!1B3!1B6!T2]
	CALLI	T1,136		;;WAIT FOR NEW C
;	PISYS.	T1,
	RETURN
	PJRST	CPOPJ1
	ENDMOD
>

;INTLOC GENERATE A LIST OF ERROR PROCESSORS
;FOR INTERRUPTS

	DEFINE	INTLOC(XXX,PROC)
<	GLOB	<PROC,PCRSH,PANIC>
	IRP	XXX,<
..ZZ==1		;;TEMPORARILY ALWAYS ON UNTILL SAFE
	IFIDN	<XXX> <PDL>,<..ZZ==1>
	IFIDN	<XXX> <NXM>,<..ZZ==1>
	ENTRY	XXX'INT
XXX'INT:
	IFN	..ZZ,<
	MOVEM	P,PCRSH		;;SAVE THE BAD P
	MOVE	P,PANIC		;;MIGHT BE THE BAD GUY
>
	CALL	PROC
	.+1,,XXX'NPC##		;INTERRUPT BLOCK AND TEXT ADDRESS
	ASCIZ	/XXX/
>	;END OF IRP
>	;;END OF DEFINE
;TO DEFINE ATABLE OF CODE VALUES ADRESSABLE
;BY TWO REGISTERS, USE THE FOLLOWING LOGIC:
;1 INVOKE .IBYTE WITH THE BYTE SIZE
;2 USE .ABYTE TO INSET ENTRIES
;3 USE .TBYTE TO DEFINE THE POINTER PART OF THE TABLE.
;ARGUMENTS NEEDED:
;1 BYTE SIZE .IBYTE
;2 CODE VALUE .ABYTE
;3 ADDRESS OF BYTE TABLE (ADR) AND DESIRED ADDRESS OF POINTER TABLE
;  (ADR1) AND ADDRESS OF POINTER INDEX REGISTER(T1) (.TBYTE)
;NOTE : ALLCALLS HAVE TO GENERATE A CONTIGUOUS PIECE OF STORAGE
;ADDRESSING OF BYTE N1: N1=Q1*BYTESIZE+R1
;	MOVEI	T1,N1
;	IDIVI	T1,SIZE
;	LDB	T1,ADR1(T1)

	DEFINE	.IBYTE(SIZE)
<..BYV==0
..BYP=SIZE-1
	DEFINE	.ABYTE(COD)
<..BYV=..BYV+<COD_<^D35-..BYP>>
..BYP=..BYP+SIZE
	IFL	<^D35-..BYP>,<
	EXP	..BYV
..BYP=SIZE-1
..BYV==0
>>
	DEFINE	.TBYTE(T1,ADR,ADR1)
<	IFN	<..BYP-SIZE+1>,<
	EXP	..BYV
>
...ZZ0=SIZE-1
ADR1:	REPEAT	<^D36/SIZE>,<
	POINT	SIZE,ADR(T1),...ZZ0
...ZZ0=...ZZ0+SIZE
>
>	;END OF .TBYTE
>	;END OF .IBYTE
	DEFINE	MUCH(LIST,MACRO)
<	IRP	LIST,<
	MACRO(LIST)
>>

;WARNING MACROS TEMPORARY VERSION ONLY

	DEFINE	WARN(WHERE,TXT)
<	TTCALL	3,INFNAM
	TTCALL	3,[ASCIZ \TXT\]
>

	DEFINE	WARNCH(WHERE,CHAR)
<	TTCALL	1,CHAR
>
	END