Google
 

Trailing-Edge - PDP-10 Archives - cust_sup_cusp_bb-x130c-sb - 10,7/unscsp/soup/servis.mac
There are 3 other files named servis.mac in the archive. Click here to see a list.
TITLE	SERVIS	VERSION 3	
SUBTTL	SOUP SERVICE ROUTINES		CWRU/CAM

;EDIT==6

;COPYRIGHT 1971, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
	HISEG
	A1=1
	A2=2
	A3=3
	A4=4
	A5=5
A7=7
	A6=6
	A8=8
	RC=16
	CHAR=13
	RETURN=14
	BAS=6
	USE=5
	DISK=200000
	DTAPE=100
	DCHAN=17
	LF=12
	VT=13
	FF=14
	ENTRY	LOGMSR,LOOKF,CONVRT,DIALOG
	EXTERN	FFSAVE,MESAPS,.JBFF
LOGPTR:	POINT	18,0(A7),

	DEFINE	SAVE <XLIST
	MOVE	.JBFF
	MOVEM	FFSAVE
	LIST>

	DEFINE	RESTOR <XLIST
	MOVE	FFSAVE
	MOVEM	.JBFF
	LIST>

; FILE LOOKUP ROUTINE LOOKF
;
;	CALL  IS	JSP A5,LOOKF
;			<ADDR OF DDB,ERR ADDR>
;			<RETURN ADDRESS>

LOOKF:
	HRRZ	RETURN,0(A5)	;ERROR ADDRESS
	SAVE
	MOVEI	A1,0
	HLRZ	CHAR,0(A5)	;DDB ADDRESS
	SETZM	6(CHAR)		;ZERO STAUS FOR DEVICE
	MOVE	A2,0(CHAR)	;DEV
	MOVE	A3,1(CHAR)	;POINTERS
	OPEN	RC,A1		;
	JRST	LOOKF2		;ERROR
	MOVE	A1,2(CHAR)	;FILE
	MOVE	A2,3(CHAR)	;EXT
	MOVEI	A3,0		;
	MOVE	A4,5(CHAR)	;
		LOOKUP	RC,A1		;LOOK UP FILE
	JRST	LOOKF2		;ERROR
	RESTOR
	RELEAS	RC,
	JRST	1(A5)		;NORMAL RETURN
LOOKF2:	RESTOR		;
	RELEAS	RC,
	JRST	0(RETURN)	;ERROR ROUTINE

	OPDEF	OUTSTR[TTCALL 3,0]
	OPDEF	INCHRW[TTCALL 4,0]
	SYN	INCHRW,INCHWL
	OPDEF	OUTCHR[TTCALL 1,0]
	OPDEF	CLRBFI[TTCALL 11,0]

;	SIXBIT TO ASCII CONVERT ROUTINE

CONVRT:
	HLRZ	CHAR,0(RETURN)
	MOVE	A1,0(CHAR)
	HRRZ	A2,0(RETURN)	;OUTPUT POINTER
	MOVE	A2,0(A2)
	HLRZ	A3,1(RETURN)	;INPUT POINTER
	MOVE	A3,0(A3)
	HRRZ	A4,1(RETURN)	;CHAR COUNT
CNVT1:
	ILDB	CHAR,A3		;LOAD INPUT CHAR
	ADDI	CHAR,40		;CONVERT TO ASCII
	IDPB	CHAR,A2		;STORE IN OUTPUT
	SOJG	A4,CNVT1
	JRST	2(RETURN)

;	LOGMSR -- MESSAGE FORMATTING ROUTINE

LOGMSR:	MOVE	LOGPTR
	SETZM	FFSAVE		;SWITCH
	MOVNI	A6,6
	ILDB	A5,0		;ADDR OF MSG
	ILDB	A8,0
	MOVEI	A4,6		;FIRST ITEM 6 CHARS
LOG.1:	ILDB	A1,0
	JUMPE	A1,LOG.5
	MOVE	A1,0(A1)	;FETCH NAME TO BE CONVERTED
	MOVE	A2,0(A8)	;OUTPUT BYTE POINTER
	MOVE	A3,MESAPS	;INPUT POINTER
	JSP	RETURN,CNVT1	;PUT
	0
	0
	MOVEI	A4,6
	SKIPE	FFSAVE
	JRST	LOG.2		;ALTERNATE 6-3-6-3-6-3 CHARS
	SETOM	FFSAVE		;
	MOVEI	A4,3		;
	SKIPA
LOG.2:	SETZM	FFSAVE		;
	AOJ	A8,		;INCREMENT POINTER INDEX
	AOJL	A6,LOG.1	;ANY MORE FORMATTING ?
LOG.5:
	JRST	4(A7)
;	DIALOG - - USER TTY DIALOG ROUTINE
;	CALL IS	JSP	A1,DIALOG
;		<NOT D RETURN>
;		<D RETURN >
;
DIALOG:
	CLRBFI
	CALL	1,[SIXBIT/EXIT/]	;SPECIAL CONTINUABLE EXIT
	OUTSTR	[ASCIZ/*/]
	INCHRW	A2
	OUTSTR	[ASCIZ/
/]
	CAIE	A2,"D"
	JRST	0(A1)
	JRST	1(A1)

	END