Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-10 - 43,50517/getasy.mac
There are 7 other files named getasy.mac in the archive. Click here to see a list.
	TITLE	GETASY FOR RPGII V1
	SUBTTL	READ IN AN ASYFIL WORD	AL BLACKINGTON/CAM/RBC

	TWOSEG
	RELOC	400000

	ENTRY	GETASY			; GET A WORD
	ENTRY	SETASY			; SET UP ASYFIL FOR INPUT


GETASY:	SOSG	AS1BHI+2		; ANYTHING LEFT IN BUFFER?
	JRST	GETASB			; NO - GET ANOTHER BUFFER

GETASA:	ILDB	CH,AS1BHI+1		; YES - GET A WORD
	POPJ	PP,			; EXIT -


GETASB:	AOS	AS1BLK			; BUMP BLOCK COUNT
	IN	ASY,			; GET A BUFFER
	JRST	GETASA			; NO ERRORS

	MOVEI	CH,AS1DEV		; SAY WHO BLEW UP
	JRST	DEVDED			; AND GO BLOW UP



SETASY:	MOVE	TA,AS1BUF		; SET .JBFF TO A BUFFER AREA
	MOVEM	TA,.JBFF##		; THUSLY
	INBUF	ASY,2			; GRAB 2 BUFFERS
	SETZM	AS1BLK			; CLEAR BLOCK COUNTER

	MOVE	TE,ASYFIL		; SET UP "LOOKUP" PARAMETERS
	MOVE	TD,AS1HDR+1		;
	SETZB	TC,TB			;
	LOOKUP	ASY,TE			; FIND THE FILE
	JRST	KNOAS1			; NOT THERE - CATATROPHE
	POPJ	PP,			; ALL OK


;CANNOT FIND ASYFIL

KNOAS1:	HRLZ	TA,ASYFIL		; GET APPROPRIATE WORD
	PUSHJ	PP,SIXOUT		; TYPE "ASn"
	OUTSTR	[ASCIZ "FIL not found
"]
	JRST	KILL			; MOST DEADLY


EXTERNAL DEVDED, KILL, SIXOUT, AS1BHI, AS1BLK, AS1DEV, AS1BUF, AS1HDR, ASYFIL


	END