/
/ COPYRIGHT (C) 1975
/ DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
/
/ THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY
/ ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH
/ THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS
/ SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-
/ VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON
/ EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO
/ THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE
/ SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.
/
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE
/ WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-
/ MITMENT BY DIGITAL EQUIPMENT CORPORATION.
/
/ DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
/ OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY
/ DEC.
/
	.EJECT
/
/ EDIT #1	M. HEBENSTREIT		12/15/75
/
/ MODE13: WRITE THE TEXT TO THE OUTPUT FILE AND APPEND NUMBER IN IFLAG
/ SPECIFIED BY FLAG. THE OUTPUT FILE MUST BE ON DAT SLOT 2.
/
	.GLOBL	MODE13,FAC57,SET57,PACK,IPACK
BASE	.CBD	.XX 200
OFF.FL=4
OFF.IF=35
OFF.TX=5
X10=10
X11=11
MODE13	0
	LAC	BASE		/GET BASE ADDR OF COMMON
	AAC	OFF.FL		/ADD OFFSET TO GET ADDR OF FLAG
	DAC	TEMP
	LAC*	TEMP		/GET VALUE IN FLAG
	TAD	BASE		/GET THE VALUE IN IFLAG
	AAC	OFF.IF
	AAC	-1
	DAC	TEMP
	LAC*	TEMP
	DAC	NUM		/SAVE THE NUMBER
	LAC	BASE		/GET BASE OF COMMON
	AAC	OFF.TX		/ADD OFFSET OF TEXT
	AAC	-1		/PREPARE TO MOVE DATA
	DAC*	(X10		/COMMON TO TEXT BUFFER
	LAC	(TEXT+1
	DAC*	(X11
	LAW	-30
	DAC	COUNT
	LAC*	X10
	DAC*	X11
	ISZ	COUNT
	JMP	.-3
	LAC	(BUFF		/INIT OUTPUT BUFFER
	JMS*	IPACK
	JMS*	SET57		/INIT TEXT BUFFER
	TEXT
LOC1	JMS*	FAC57		/GET CHAR
	SAD	(15		/IS IT A BREAK?
	JMP	LOC2
	SAD	(175
	JMS	LOC2
	SAD	(40
	JMP	LOC2
	JMS*	PACK		/NO -- PACK CHAR
	JMP	LOC1		/GO GET NEXT CHAR
LOC2	LAW	-6		/PACK NUMBER INTO OUTPUT BUFFER
	DAC	COUNT
	LAC	NUM
	LMQ
KKK	CLA
	LLS	3
	AAC	60
	JMS*	PACK
	ISZ	COUNT
	JMP	KKK
	LAC	(15		/PACK CR INTO OUTPUT BUFFER
	JMS*	PACK
	.WRITE	2,2,BUFF,40
	.WAIT	2
	JMP*	MODE13		/RETURN
/
/
TEXT	015000
	0
	.BLOCK	30
BUFF	.BLOCK	40
COUNT	0
TEMP	0
NUM	0
	.END
