	.TITLE ASKIT
	.GLOBL BUFFER,IMAGE,CHANGE,DOWE,ASK,FINI
	.GLOBL A16,A17,PUTIT
	.GLOBL OUTIMG,PCK,ADDR2,UNPCK
/
/  1 MAY 73 - MOD FOR HANDLING SOURCE FILES WITH NUMBERED LINES
/  2 MAY 73 - DEBUG
/  17 JULY 74 - MAJOR REVISION OF MESSAGES
/  5 FEB 75 - ADD NEW MESSAGES
/  29 MAY 75 - ADD MESSAGE NUMBER 21
/  6 MAY 75 - CONTINUE TO DEBUG
/
TTI=-2
TTO=-3
/
	.IODEV TTI,TTO
/
WHICH;TEMP2;OBJECT;TEMP;FRONT;PNTR;PNTR1;CNT
/
DOWE	0
CHANGE	1
CHAR	40
/
AUTO1=10
AUTO2=11
AUTO3=12
AUTO4=13
/
/
/SUBROUTINE FOR USER INTERATION WITH HIS PROGRAMS
/
COUT	SPA
	JMP	COUTS
	LAC	(TELL10
	DAC	WRITE+2
	JMS	TELL
	LAC	BUFFER	/TELL USER WE ARE GOINT TO DISPLAY THE LINE IN
	DAC	WRITE+2	/QUESTION
	JMS	TELL
	JMP*	FINI	/THEN GET OUT
COUTS	DZM	DOWE
	LAW	-1
	DAC	CHANGE	/ALWAYS SET FOR QUICK EXIT
	JMP*	ASK		/-1=QUICK EXIT, 0=READ SOMETHING, 1=TERMINAL
/
ASK	XX
	DAC	WHICH
	JMS	SETUP
	LAC	WHICH
	TAD	(MESGS	/GET SET TO ASK APPROPRIATE QUESTION
	DAC	TEMP2
	LAC*	TEMP2
	DAC	WRITE+2
	JMS	TELL
	LAC	CHANGE	/DO WE WANT A QUICK EXIT
	SZA
	JMP	COUT	/YES GET OUT
RAGN	.READ TTI,2,BUFFER,34
	.WAIT TTI
	JMS*	UNPCK
	LAC	DOWE	/A YES OR NO ANSWER?
	SZA
	JMP	COUTS	/NO - GET OUT
	JMS	YORN
	SMA
	JMP	COUTS
	.WRITE TTO,2,WHT,34
	JMP	RAGN
/
YORN	XX
	LAC*	IMAGE
	SAD	(131
	JMP*	YORN	/ANSWER IS YES
	SAD	(116	/N
	JMP	.+3
	CLC
	JMP*	YORN	/UNRECOGNIZABLE REPLY
	CLA
	JMP*	YORN	/ANSWER IS NO
/
TELL	XX
WRITE	.WRITE TTO,2,BUFFER,34
	.WAIT TTO
	JMP*	TELL
/
SETUP	XX
	LAC	BUFFER
	DAC	MESGS+1
	DAC	RAGN+2
	LAC	.+2
	DAC	SETUP+1
	JMP*	SETUP
/
/
MESGS	ASK1	/0 - SUPPLY FILE NAME
	BUFFER	/1 - DISPLAY LINE IN QUESTION
	ERR1	/2 - FILE NOT FOUND
	TELL1	/3 - SAME WARNING
	TELL2	/4 - TITLE COMMAND FOUND MORE THAN ONCE OR OUT OF SEQUENCE
	ASK16	/5 -TELL USER HE REQUIRES SO MUCH SPACE
	ASK17	/6 - TELL USER HOW MANY SPACES ARE AVAILABLE
	ASK18	/7 - ASK USER TO CHOOSE AN OPTION
	TELL3	/10 - INDEX TABLE OVERFLOW
	TELL5	/11 - MORE THAN 10 LINES FOR INDEX ENTRY
	ASK21	/12 - SPACE REQUEST TOO LARGE
	TELL6	/13 - NO PREVIOUS $II COMMAND ENCOUNTERED BEFORE THIS $I COMMAND
	TELL7	/14 - MULTIPLE $IE COMMANDS ENCOUNTERED - IGNORE
	TELL8	/15 - NO TEXT ALLOWED AFTER $IE - ONLY COMMANDS
	TELL9	/16 - END OF GROUP ENCOUNTERED WHILE IN PARAGRAPH MODE
	TELL10	/17 - LINE IN QUESTION IS
	TELL11	/20 - TOO MANY LINES FOR CENTERED PAGE
	TELL12	/21 - $IE IGNORED BECAUSE IT WEAS 1ST INDEX COMMMAND ENCOUNTERED
	NTHR	/22
	NTHR	/23
	NTHR	/24
	NTHR	/25
	NTHR	/26
	NTHR	/27
	TELL18	/30 - NUMBER OUTSIDE OPTION RANGE
	TELL19	/31 - REQUEST MUST BE ALTERED - ENTER NEW NO OF SPACES
	NTHR	/32
	NTHR	/33
	TELL22	/34 - COMMAND NOT IMPLIMENTED YET - IGNORE TILL NEXT COMMAND
	INE	/35 - END OF FILE REACHED WHILE GETTING INDEX LINE
	TELL23	/36 - OPTION NOT IMPLIMENTED - CHOOSE ANOTHER
	NTHR	/37
	TELL24	/40 - EOF REACHED WHILE GETTING TITLE LINES
	TELL25	/41 - CANNOT HAVE ALTMODE TERMINATOR IN TITLE LINE
	TELL26	/42 - TITLE BUFFER OVERFLOW
	TELL27	/43 - CANNOT HAVE ALTMODE TERMINATOR IN CENTERED LINE
	NTHR	/44
	NTHR	/45
	TELL30	/46 - IN JMP TABLE FOR COMMANDS - GOT A WRONG NUMBER
	NTHR	/47
	TELL32	/50 - PROGRAM SHOULD NOT BE AT THIS POINT
	NTHR	/51
	NTHR	/52
	TELL35	/53 - TERMINAL ERROR
	TELL36	/54 - INDENTATION TOO LARGE
	TELL37	/55 - SHOULD HAVE FOUND A PAGE NUMBER - DIDN'T
	NTHR	/56
	TELL39	/57 - IMPROPER NO OF NOS FOR FUNCTION
	TELL40	/60 - WARNING - THIS LINE HAS NO SPACES
	TELL41	/61 - BLANK LINE ENCOUNTERED
/
INE	I-.*400+2
	0
	.ASCII 'REACHDD END OF FILE WHILE GETTING AN INDEX LINE'<15>
I=.
/
ERR1	ER1-.*400+2
	0
	.ASCII 'FILE NOT FOUND - TRY AGAIN'<15>
ER1=.
/
WHT	W-.*400+2
	0
	.ASCII 'WHAT?'<15>
W=.
/
ASK1	AS1-.*400+2
	0
	.ASCII 'ENTER FILE NAME>'<175>
AS1=.
/
ASK16	AS16-.*400+2
	0
	.ASCII 'YOU REQUIRE '
A16	.ASCII '20   '
	.ASCII ' SPACES'<15>
AS16=.
/
ASK17	AS17-.*400+2
	0
	.ASCII 'ONLY '
A17	.ASCII '12   '
	.ASCII ' SPACES ARE AVAILABLE'<15>
AS17=.
/
ASK18	AS18-.*400+2
	0
	.ASCII 'CHOOSE OPTIONS 0,1,2,3 OR 4 >'<175>
AS18=.
/
ASK21	AS21-.*400+2
	0
	.ASCII 'TOO MUCH SPACE REQUESTED'<15>
AS21=.
/
TELL1	TE1-.*400+2
	0
	.ASCII 'SAME WARNING!!'<15>
TE1=.
/
TELL2	TE2-.*400+2
	0
	.ASCII 'TITLE OUT OF SEQUENCE OR MUTLPLE TITLES - IGNORED'<15>
TE2=.
/
TELL3	TE3-.*400+2
	0
	.ASCII 'INDEX TABLE OVERLOW - TOO MANY ENTRIES'<15>
TE3=.
/
TELL5	TE5-.*400+2
	0
	.ASCII 'MORE THAN 10 ENTRIES FOR THIS INDEX ENTRY'<15>
TE5=.
/
TELL6	TE6-.*400+2
	0
	.ASCII '$II COMMAND MUST PRECEED USED OF $I COMMAND'<15>
TE6=.
/
TELL7	TE7-.*400+2
	0
	.ASCII 'MULTPLE $IE COMMANDS - IGNORED'<15>
TE7=.
/
TELL8	TE8-.*400+2
	0
	.ASCII 'NO TEXT ALLOWED AFTER $IE - ONLY COMMANDS'<15>
TE8=.
/
TELL9	TE9-.*400+2
	0
	.ASCII 'END OF GROUP ENCOUNTERED WHILE IN PARAGRAPH MODE'<15>
TE9=.
/
TELL10	TE10-.*400+2
	0
	.ASCII 'LINE IN QUESTION IS:'<15>
TE10=.
/
TELL11	TE11-.*400+2
	0
	.ASCII 'TOO MANY LINES FOR CENTERED PAGE'<15>
TE11=.
/
TELL12	TE12-.*400+2
	0
	.ASCII 'WARNING - $IE IGNORED BECAUSE IT IS 1ST INDEX COMMAND'<15>
TE12=.
/
TELL18	TE18-.*400+2
	0
	.ASCII 'NUMBER MUST BE 0,1,2,3 OR 4'<15>
TE18=.
/
TELL19	TE19-.*400+2
	0
	.ASCII 'REQUEST MUST/CAN BE ALTERED '
	.ASCII '- ENTER NEW NUMBER OF SPACES'<15>
TE19=.
TELL22	TE22-.*400+2
	0
	.ASCII 'COMMAND NOT IMPLIMENTED - IGNORE INPUT UNTIL NEXT'
	.ASCII ' COMMAND'<15>
TE22=.
/
TELL23	TE23-.*400+2
	0
	.ASCII 'OPTION NOT IMPLIMENTED - PICK ANOTHER'<15>
TE23=.
/
TELL24	TE24-.*400+2
	0
	.ASCII 'EOF REACHED WHILE GETTING TITLE LINES'<15>
TE24=.
/
TELL25	TE25-.*400+2
	0
	.ASCII 'CANNOT HAVE ALTMODE TERMINATOR IN TITLE LINE'<15>
TE25=.
/
TELL26	TE26-.*400+2
	0
	.ASCII 'TITLE TABLE OVERFLOW'<15>
TE26=.
/
TELL27	TE27-.*400+2
	0
	.ASCII 'CANNOT HAVE LATMODE TERMINATOR IN CENTERED LINE'<15>
TE27=.
/
TELL30	TE30-.*400+2
	0
	.ASCII 'GOT A WRONG NUMBER TO JMP TABLE FOR COMMANDS'<15>
TE30=.
/
TELL32	TE32-.*400+2
	0
	.ASCII 'PROGRAM SHOULD NOT BE AT THIS POINT '
PUTIT	.ASCII 'PLACE'
	.ASCII <15>
TE32=.
/
NTHR	NT-.*400+2
	0
	.ASCII 'MESG NOT WRITTEN YET'<15>
NT=.
/
TELL35	TE35-.*400+2
	0
	.ASCII 'TERMINAL ERROR'<15>
TE35=.
/
TELL36	TE36-.*400+2
	0
	.ASCII 'INDENTATION REQUEST TOO LARGE'<15>
TE36=.
/
TELL37	TE37-.*400+2
	0
	.ASCII 'SHOULD HAVE FOUND A PAGE NUMBER IN HEAD - DIDNT'<15>
TE37=.
/
TELL39	TE39-.*400+2
	0
	.ASCII 'IMPORPER NUMBER OF NUMBERS FOR FUNCTION'<15>
TE39=.
/
TELL40	TE40-.*400+2
	0
	.ASCII 'THIS LINE HAS NO SPACES'<15>
TE40=.
/
TELL41	TE41-.*400+2
	0
	.ASCII 'BLANK LINE ENCOUNTERED'<15>
TE41=.
/
	.END
