Google
 

Trailing-Edge - PDP-10 Archives - cuspmar86binsrc_2of2_bb-fp63a-sb - 10,7/swil/swihlp.mac
There are 4 other files named swihlp.mac in the archive. Click here to see a list.
	TITLE	.HELPR	SWIL "HELP" processing module %5(41)
	SUBTTL	A.W.LYONS/AWL/PFC	17-OCT-73

	SEARCH	SWIDEF,	SWIL		;SWIL PACKAGE DEFINTIONS
	SEARCH	JOBDAT,	MACTEN,	UUOSYM	;STANDARD DEFINITIONS

	SALL				;PRETTY LISTINGS
	.DIREC	FLBLST			;PRETTIER LISTINGS

	TWOSEG	400000			;NICE PURE CODE


	COMMENT	\
COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984,1986.  ALL RIGHTS RESERVED.


THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
TRANSFERRED.

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.

DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

\
	SUBTTL	Version and Revision History

MAJVER==13	;MAJOR VERSION LEVEL
MINVER==0	;MINOR (MAINTENANCE RELEASE) LEVEL
CSTVER==0	;CUSTOMER VERSION (WHO LAST . . .)
EDTVER==1022	;EDIT LEVEL

%%HELP==:<BYTE	(3)CSTVER(9)MAJVER(6)MINVER(18)EDTVER>
%%SWIL==:%%SWIL	;SHOW (AND SYNCHRONIZE) SWIL VERSION

IF2,<	PURGE	CSTVER,MAJVER,MINVER,EDTVER>



;%4(35) JAN 1972

;36	(10-9713) HANDLE SEQUENCED FILES AND I/O ERRORS
;37	(10-11567) HANDLE HLP:
;40	ADD ALTERNATE ENTRY 'HELPER' FOR FORTRAN/COBOL
;41	EXPAND SORRY MESSAGE

;1000	RDH	01-Jan-84
;	Incorporate into SWIL %12(1000), sync edit level at 1000.

;1022 	LEO	09-Sep-85
;	Do Copyrights.

;HELPER IS A SUBROUTINE USED TO OUTPUT HELP TEXTS(HLP:/SYS:??????.HLP)
; ONTO DEVICE TTY.  IT WAS DESIGNED AS A TOOL FOR THE VARIOUS
; MODULES OF THE MULTI-PROGRAMMING-BATCH PROJECT.
;
;ENTERED WITH THE SIXBIT MODULE NAME IN AC1 VIA:
;	PUSHJ	P,.HELPR
;	RETURN TO HERE AT END OF HELPER
;
;OR	MOVEI	16,[,,['MODULE']]
;	PUSHJ	17,HELPER
;
;HELPER REQUIRES EIGHT(8) LOCATIONS ON THE PUSH-DOWN LIST
; ON WHICH TO STORE AND FROM WHICH TO RESTORE USER AC'S.

;ACCUMULATORS

T1=1
T2=2
T3=3
T4=4
AP=16	;ARG LIST POINTER
P=17

;DEVICE CHANNELS

DSK=0

ENTRY	.HELPR,HELPER
HELPER:	MOVE	T1,@(AP)	;FETCH FIRST ARG

.HELPR:	PUSH	P,T2		;SAVE ACS THAT ARE USED
	PUSH	P,T3
	PUSH	P,T4
	PUSH	P,.JBFF		;SAVE .JBFF
	MOVE	T2,.JBREL	;GET ACTUAL CORE SIZE
	HRLM	T2,(P)		;SAVE FOR RESTORATION
	SETZ	T2,		;TO LOAD BUFFER HEADER INTO PDL
	PUSH	P,T2		; LOAD UP 4 ZEROED LOCATIONS
	PUSH	P,T2
	PUSH	P,T2
	PUSH	P,T2

GETHLP:	SKIPA	T3,['HLP   ']	;GET HLP:
GETSYS:	MOVSI	T3,'SYS'
	HRRZI	T4,-2(P)
	OPEN	DSK,T2
	  JRST	SORRY
	MOVSI	T2,'HLP'
	SETZB	T3,T4
	LOOKUP	DSK,T1
	  TLZA	T2,-1		;CLEAR JUNK
	JRST	MORE		;GOOD--GO READ FILE
	CAIE	T2,ERSNF%
	CAIN	T2,ERSLE%
	JRST	AGAIN
	CAILE	T2,ERIPP%
	JRST	SORRY		;HORRIBLE DISK ERROR
AGAIN:	SETZM	T2		;CLEAR PHYSICAL BIT
	AOS	T3,-3(P)	;TRY NEXT CASE
	TRNE	T3,1		;SEE IF ODD
	TXO	T2,UU.PHS	;YES--TRY PHYSICAL ONLY
	JRST	@[GETHLP	;TRY HLP: AGAIN
		  GETSYS	;THEN LOGICAL SYS:
		  GETSYS	;THEN PHYSICAL SYS:
		  SORRY]-1(T3)	;THEN GIVE UP
MORE:	IN	DSK,
	  JRST	GETCHR
	STATZ	DSK,IO.ERR	;SEE IF ERRORS
	  JRST	IOERR		;YES--ISSUE MESSAGE
	STATZ	DSK,IO.EOF	; YET?
	  JRST	DONE		;YES, ALL DONE!

GETCHR:	SOSGE	T2,(P)
	JRST	MORE
	IBP	-1(P)		;INCR CHAR POINTER
	MOVE	T1,@-1(P)	;GET THIS WORD
	TRNE	T1,1		;SEE IF SEQUENCE NUMBER
	JRST	[AOS   -1(P)	;YES--SKIP 5 MORE CHARS
		 MOVNI T1,5	; ..
		 ADDM  T1,(P)	; ..
		 JRST  GETCHR]
	LDB	T1,-1(P)
	OUTCHR	T1
	JRST	GETCHR
IOERR:	OUTSTR	[ASCIZ	\%HLRIOE I/O error reading help file\]
	JRST	SORRYX		;FINISH WITH SORRY MESSAGE	[41]
SORRY:	OUTSTR	[ASCIZ /%HLRNHF No .HLP file on SYS:/]
SORRYX:	OUTSTR	[ASCIZ/; I'm sorry, I can't help you/]

DONE:	OUTSTR	[ASCIZ/
/]
	RELEAS	DSK,
	SUB	P,[4,,4]	;RESTORE PDL
	POP	P,T1		;RETRIEVE .JBFF IN "T1"
	HRRZM	T1,.JBFF	;RESTORE .JBFF
	HLRZ	T1,T1		;RETRIEVE .JBCOR
	CORE	T1,
	  JFCL			;IGNORE ERROR
	POP	P,T4
	POP	P,T3
	POP	P,T2
	POPJ	P,		;RETURN TO CALLER

	XLIST		;LITERALS
	LIT
	LIST
	RELOC

	END