Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0064/mafman.mac
There are 2 other files named mafman.mac in the archive. Click here to see a list.
TITLE	MAFMAN

SUBTTL	ROUTINE TO PRINT OUT THE MAFIA MANUAL

;FILE MAFIA.MAN MUST BE ON THE DSK UNDER [1,1]


;DEFINITIONS :

AC1=1

PAGE

START:	INIT	17,0		;INITIALIZE THE DSK
	SIXBIT	/SYS/
	0,,IBUF
	JRST	DSKNA		;DSK NOT AVAILABLE

	LOOKUP	17,FILE		;FILE ONLINE.MAN
	JRST	NOTFND

	INIT	16,0		;INITIALIZE THE LPT
	SIXBIT	/LPT/
	OBUF,,0
	JRST	LPTNA		;LPT NOT AVAILABLE

GETCNT:	SOSG	IBUF+2		;DECREMENT BYTE COUNT
	JRST	GETBUF		;BUFFER EMPTY

GETNXT:	ILDB	AC1,IBUF+1	;GET NEXT CHAR
	JUMPN	AC1,PUTCHR	;IF NO NULL CHAR,OUTPUT
	JRST	GETCNT		;IGNORE NULL AND GET NEXT CHAR

GETBUF:	IN	17,		;REFILL THIS BUFFER
	JRST	GETNXT		;NORMAL RETURN
	STATZ	17,740000	;CHECK ERROR BITS
	JRST	INERR		;INPUT ERROR
	CLOSE	16,		;ALL DONE
	CALLI	12		;EXIT

PUTCHR:	SOSG	OBUF+2		;INCREMENT BYTE COUNT
	JRST	PUTBUF		;NO MORE ROOM

PUTNXT:	IDPB	AC1,OBUF+1	;STORE CHAR
	JRST	GETCNT		;GET NEXT CHAR

PUTBUF:	OUT	16,		;EMPTY THIS BUFFER
	JRST	PUTNXT		;NORMAL RETURN
	TTCALL	3,[ASCIZ/OUTPUT ERROR
/]
	CALLI	12		;EXIT


FILE:	SIXBIT	/MAFIA/
	SIXBIT	/MAN/
	0
	0

IBUF:	BLOCK	3
OBUF:	BLOCK	3

DSKNA:	TTCALL	3,[ASCIZ/DSK NOT AVAILABLE
/]
	CALLI	12

LPTNA:	TTCALL	3,[ASCIZ/LPT NOT AVAILABLE
/]
	CALLI	12

NOTFND:	TTCALL	3,[ASCIZ/FILE MAFIA.MAN NOT FOUND
/]
	CALLI	12

INERR:	TTCALL	3,[ASCIZ/INPUT ERROR
/]
	CALLI	12

	END	START