Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50031/once.mac
There are 10 other files named once.mac in the archive. Click here to see a list.
	TITLE ONCE ONLY CODE - USER MODE
	SUBTTL	DAVID M NIXON	 DEC 1969

;MUST BE LOADED LAST AFTER UDDT

	LOC 124
	JRST ST
	RELOC

;AC DEFINITIONS
	TAC=1
	TAC1=2
	PDP=3
	TEM=10
	AC1=15
	AC2=16

EXTERNAL JOBSYM,JOBSA,JOBDDT,JOBREL,DDTEND

; THIS SUBROUTINE MUST BE FIRST
EX:	MOVEI TAC,ST
	HRL TAC,JOBSYM
	HRRM TAC,JOBSYM
	MOVE TAC1,MOVSYM
	ADDM TAC1,.+1
	BLT TAC,ST-1
	HRRZ TAC,.-1
	HRLM TAC,JOBSA
	HLRZ TAC,JOBSA
EX1:	TRO TAC,1777
	CALLI TAC,11
	JFCL
EX2:	SETZM 124
	HRRZ TAC,JOBSA
	JRST (TAC)
;	************
ST:	SETZM MOVSYM
	MOVE PDP,[XWD -10,STACK]
ONCE2:	MOVEI TAC,SYSDM
	PUSHJ PDP,YESNO
	JRST ONCE3
	MOVEI TAC,SYMMES
	PUSHJ PDP,YESNO
	JRST ONCE2A		
	MOVEI TAC,ALLMES
	PUSHJ PDP,YESNO
	PUSHJ PDP,GETSYM
	HLRE TAC,JOBSYM		
	MOVNS TAC
	MOVEM TAC,MOVSYM
	ADDI TAC,DDTEND
	HRLM TAC,JOBSA
	JRST EX

ONCE2A:	MOVEI TAC,DDTEND
	HRLM TAC,JOBSA
	JRST EX2

ONCE3:	HRRZ TAC1,JOBDDT
	HRLM TAC1,JOBSA
	MOVEI TAC,0
	MOVEM TAC,JOBSYM
	CALLI TAC,2
	MOVEI TAC,ST
	JRST EX1

GETSYM:	HLRE TAC,JOBSYM
	MOVNS TAC
	HRRZ TAC1,JOBSYM
	ADDI TAC,-1(TAC1)
	MOVEM TAC,SYMTOP
GETSY1:	MOVE TAC,SYMTOP
	ADD TAC,MOVSYM
	TRO TAC,1777
	CAME TAC,JOBREL
	JRST REDUCE
	MOVE TAC,SYMTOP
	MOVE TAC,-1(TAC)
	MOVE AC2,[POINT 7,SYMNAM,13]
	MOVSI TEM,-6		
SPT:	IDIVI TAC,50
	HRLM TAC1,(PDP)
	AOBJP TEM,.+2
	PUSHJ PDP,SPT
	HLRZ TAC,(PDP)
	JUMPE TAC,TYPE
	ADDI TAC,60-1
	CAILE TAC,71
	ADDI TAC,101-72
	CAILE TAC,132
	SUBI TAC,134-44
	CAIN TAC,43
	MOVEI TAC,56
TYPE:	MOVEI TAC,40(TAC)	
	IDPB TAC,AC2
	SOSLE TEM
	POPJ PDP,

OUT:	HLRE TAC,@SYMTOP
	JUMPE TAC,FIN
	MOVEI TAC,SYMNAM
	PUSHJ PDP,YESNO	
	JRST DEL
SAV:	HLRE TAC1,@SYMTOP
	MOVNS TAC1
	MOVEM TAC1,SIZE
	MOVE TAC,MOVSYM
	ADD TAC,TAC1
	MOVEM TAC,MOVSYM
	MOVN TAC,TAC1
	ADDM TAC,SYMTOP
	JRST GETSY1
DEL:	HLRE TAC,@SYMTOP
	ADDM TAC,SYMTOP
	MOVNS TAC
	MOVEM TAC,SIZE
	MOVS TAC,JOBSYM
	ADD TAC,SIZE
	MOVSM TAC,JOBSYM
	SKIPN MOVSYM
	JRST GETSY1
	MOVE TAC,SYMTOP
	ADDI TAC,1
	HRL TAC,TAC
	ADD TAC,SIZE
	MOVSS TAC
	HRRZ TAC1,SYMTOP
	ADD TAC1,MOVSYM
	HRRM TAC1,.+1
	BLT TAC,.
	JRST GETSY1

NOSYM:	SETZM JOBSYM
	POPJ PDP,

FIN:	SKIPN MOVSYM
	JRST NOSYM
	HRRZ TAC,JOBSYM
	HRRZ TAC1,SYMTOP
	ADDI TAC1,1
	HRRM TAC1,JOBSYM
	SUB TAC1,TAC
	MOVS TAC,JOBSYM
	ADD TAC,TAC1
	MOVSM TAC,JOBSYM
FINISH:	POPJ PDP,

REDUCE:	CALLI TAC,11
	JFCL
	JRST GETSY1

YESNO:	TTCALL 3,(TAC)
	TTCALL 0,TAC1
	CAIN TAC1,"N"
	POPJ PDP,
	CAIE TAC1,"Y"
	JRST .-4
	AOS (PDP)
	POPJ PDP,
SYSDM:	ASCIZ /
DO YOU WANT DDT (Y OR N)?
/
SYMMES:	ASCIZ /
DO YOU WANT TO PROTECT THE SYMBOLS ?
/
ALLMES:	ASCIZ /
ALL OF THEM ?
/
SYMNAM:	ASCIZ /
      
/
MOVSYM:	BLOCK 1
SIZE:	BLOCK 1
SYMTOP:	BLOCK 1
STACK:	BLOCK 10
IF2,<
PURGE TAC,TAC1,PDP,TEM,AC1,AC2,EX,EX1,EX2,ST,ONCE2,ONCE2A,GETSYM,GETSY1
PURGE SPT,TYPE,OUT,SAV,DEL,NOSYM,FIN,FINISH,REDUCE,YESNO,ONCE3,SYSDM
PURGE SYMMES,ALLMES,SYMNAM,MOVSYM,SIZE,SYMTOP,STACK
>
	END