proc getse
	filen	getchlib.icn
	local	0,001000,s
	local	1,000020,chr
	local	2,000040,BS
	local	3,000000,getval
	local	4,000000,reset_tty
	local	5,000000,stop
	local	6,000000,getch
	local	7,000000,c_cc
	local	8,000000,writes
	con	0,010000,2,142,143
	con	1,010000,1,010
	con	2,010000,2,142,163
	con	3,010000,30,131,157,165,162,040,164,145,162,155,151,156,141,154,040,143,141,156,047,164,040,142,141,143,153,163,160,141,143,145,041
	con	4,010000,0
	con	5,010000,1,015
	con	6,010000,1,012
	con	7,002000,1,1
	declend
	line	200
	colm	11
	init	L1
	mark	L1
	mark	L2
	pnull
	var	2
	mark	L3
	var	3
	str	0
	line	219
	colm	21
	invoke	1
	esusp
	goto	L4
lab L3
	str	1
lab L4
	line	219
	colm	12
	asgn
	unmark
lab L2
	mark0
	mark	L5
	var	3
	str	2
	line	220
	colm	22
	invoke	1
	unmark
	efail
lab L5
	pnull
	unmark
	mark	L6
	var	4
	line	221
	colm	22
	invoke	0
	unmark
lab L6
	var	5
	str	3
	line	222
	colm	17
	invoke	1
	unmark
lab L1
	mark	L7
	pnull
	pnull
	var	0
	line	226
	colm	5
	null
	str	4
	line	226
	colm	8
	asgn
	unmark
lab L7
	mark	L8
lab L9
	mark	L9
	mark0
	pnull
	var	1
	mark	L13
	var	6
	line	228
	colm	26
	invoke	0
	esusp
	goto	L14
lab L13
	line	228
	colm	31
	pfail
lab L14
	line	228
	colm	18
	asgn
	eret
	mark	L15
	ccase
	mark	L16
	str	5
	esusp
	goto	L17
lab L16
	str	6
lab L17
	line	229
	colm	26
	eqv
	unmark
	pop
	mark	L18
	var	0
	line	229
	colm	28
	pret
lab L18
	pfail
	goto	L12
lab L15
	mark	L19
	ccase
	pnull
	var	7
	line	230
	colm	17
	field	vkill
	line	230
	colm	26
	eqv
	unmark
	pop
	mark	L20
	mark0
	pnull
	pnull
	var	0
	line	231
	colm	20
	size
	int	7
	line	231
	colm	23
	numlt
	unmark
	unmark
	goto	L10
	unmark
lab L20
	mark	L21
	mark0
	pnull
	int	7
	pnull
	var	0
	line	232
	colm	28
	size
	push1
	line	232
	colm	25
	toby
	pop
	mark0
	var	8
	var	2
	line	232
	colm	40
	invoke	1
	unmark
lab L22
	efail
lab L23
	unmark
lab L21
	pnull
	var	0
	str	4
	line	233
	colm	19
	asgn
	goto	L12
lab L19
	mark	L24
	ccase
	pnull
	var	7
	line	235
	colm	17
	field	verase
	line	235
	colm	27
	eqv
	unmark
	pop
	mark	L25
	var	8
	var	2
	line	237
	colm	23
	invoke	1
	pop
	pnull
	var	0
	pnull
	var	0
	int	7
	pnull
	int	7
	line	237
	colm	39
	neg
	line	237
	colm	38
	sect
	line	237
	colm	32
	asgn
	unmark
lab L25
	mark0
	pnull
	pnull
	var	0
	line	238
	colm	20
	size
	int	7
	line	238
	colm	23
	numlt
	unmark
	line	238
	colm	32
	pfail
	goto	L12
lab L24
	pop
	var	8
	var	1
	line	240
	colm	28
	invoke	1
	pop
	pnull
	var	0
	dup
	var	1
	line	240
	colm	38
	cat
	asgn
lab L12
lab L10
	unmark
	goto	L9
lab L11
	unmark
lab L8
	pnull
	line	244
	colm	1
	pfail
	end
proc setup_tty
	local	0,000000,change_tty_mode
	con	0,010000,5,163,145,164,165,160
	declend
	line	248
	colm	11
	mark	L1
	var	0
	str	0
	line	249
	colm	20
	invoke	1
	unmark
lab L1
	mark	L2
	mark	L3
	pnull
	line	250
	colm	5
	pret
lab L3
	pfail
	unmark
lab L2
	pnull
	line	251
	colm	1
	pfail
	end
proc reset_tty
	local	0,000000,current_mode
	local	1,000000,change_tty_mode
	con	0,010000,5,162,145,163,145,164
	declend
	line	255
	colm	11
	mark	L1
	pnull
	var	0
	line	258
	colm	21
	keywd	null
	line	258
	colm	18
	asgn
	unmark
lab L1
	mark	L2
	var	1
	str	0
	line	259
	colm	20
	invoke	1
	unmark
lab L2
	mark	L3
	mark	L4
	pnull
	line	260
	colm	5
	pret
lab L4
	pfail
	unmark
lab L3
	pnull
	line	262
	colm	1
	pfail
	end
proc getch
	local	0,000020,chr
	local	1,000000,current_mode
	local	2,000000,setup_tty
	local	3,000000,reads
	local	4,000000,c_cc
	local	5,000000,reset_tty
	local	6,000000,stop
	con	0,002000,1,1
	declend
	line	266
	colm	11
	mark	L1
	mark0
	pnull
	pnull
	var	1
	line	272
	colm	8
	null
	int	0
	line	272
	colm	22
	asgn
	unmark
	var	2
	line	273
	colm	18
	invoke	0
	unmark
lab L1
	mark	L2
	pnull
	var	0
	var	3
	line	275
	colm	18
	keywd	input
	line	275
	colm	17
	invoke	1
	line	275
	colm	9
	asgn
	unmark
lab L2
	mark	L3
	mark0
	var	0
	eret
	mark	L5
	ccase
	pnull
	var	4
	line	277
	colm	13
	field	vintr
	line	277
	colm	20
	eqv
	unmark
	pop
	var	5
	line	277
	colm	31
	invoke	0
	pop
	var	6
	line	277
	colm	40
	invoke	0
	goto	L4
lab L5
	mark	L6
	ccase
	pnull
	var	4
	line	278
	colm	13
	field	vquit
	line	278
	colm	21
	eqv
	unmark
	pop
	var	5
	line	278
	colm	32
	invoke	0
	pop
	var	6
	line	278
	colm	41
	invoke	0
	goto	L4
lab L6
	pop
	mark	L7
	var	0
	line	279
	colm	19
	pret
lab L7
	pfail
lab L4
	unmark
lab L3
	pnull
	line	282
	colm	1
	pfail
	end
proc getche
	local	0,000020,chr
	local	1,000000,current_mode
	local	2,000000,setup_tty
	local	3,000000,reads
	local	4,000000,c_cc
	local	5,000000,reset_tty
	local	6,000000,stop
	local	7,000000,writes
	con	0,002000,1,1
	declend
	line	286
	colm	11
	mark	L1
	mark0
	pnull
	pnull
	var	1
	line	292
	colm	8
	null
	int	0
	line	292
	colm	22
	asgn
	unmark
	var	2
	line	293
	colm	18
	invoke	0
	unmark
lab L1
	mark	L2
	pnull
	var	0
	var	3
	line	295
	colm	18
	keywd	input
	line	295
	colm	17
	invoke	1
	line	295
	colm	9
	asgn
	unmark
lab L2
	mark	L3
	mark0
	var	0
	eret
	mark	L5
	ccase
	pnull
	var	4
	line	297
	colm	13
	field	vintr
	line	297
	colm	21
	eqv
	unmark
	pop
	var	5
	line	297
	colm	32
	invoke	0
	pop
	var	6
	line	297
	colm	41
	invoke	0
	goto	L4
lab L5
	mark	L6
	ccase
	pnull
	var	4
	line	298
	colm	13
	field	vquit
	line	298
	colm	21
	eqv
	unmark
	pop
	var	5
	line	298
	colm	32
	invoke	0
	pop
	var	6
	line	298
	colm	41
	invoke	0
	goto	L4
lab L6
	pop
	var	7
	var	0
	line	299
	colm	25
	invoke	1
	pop
	mark	L7
	var	0
	line	299
	colm	33
	pret
lab L7
	pfail
lab L4
	unmark
lab L3
	pnull
	line	302
	colm	1
	pfail
	end
proc change_tty_mode
	local	0,001000,switch
	local	1,000020,get_term_params
	local	2,000020,i
	local	3,000040,reset_string
	local	4,000000,getval
	local	5,000000,find
	local	6,000000,map
	local	7,000000,stop
	local	8,000000,open
	local	9,000000,close
	local	10,000000,tab
	local	11,000000,c_cc
	local	12,000000,termio_struct
	local	13,000000,char
	local	14,000000,integer
	local	15,000000,move
	local	16,000000,system
	con	0,010000,2,154,151
	con	1,010000,4,165,156,151,170
	con	2,010000,53,143,150,141,156,147,145,137,164,164,171,137,155,157,144,145,072,040,040,124,150,145,163,145,040,162,157,165,164,151,156,145,163,040,155,165,163,164,040,162,165,156,040,165,156,144,145,162,040,125,116,111,130,056
	con	3,010000,17,057,142,151,156,057,163,164,164,171,040,055,147,040,062,076,046,061
	con	4,010000,2,160,162
	con	5,002000,1,1
	con	6,002000,1,4
	con	7,010000,1,072
	con	8,010000,1,003
	con	9,010000,1,034
	con	10,010000,1,010
	con	11,010000,1,025
	con	12,002000,1,3
	con	13,010000,3,061,066,162
	con	14,002000,1,0
	con	15,010000,5,163,145,164,165,160
	con	16,010000,19,057,142,151,156,057,163,164,164,171,040,055,145,143,150,157,040,162,141,167
	con	17,010000,10,057,142,151,156,057,163,164,164,171,040
	declend
	line	306
	colm	11
	init	L1
	mark	L1
	mark	L2
	var	4
	str	0
	line	312
	colm	15
	invoke	1
	unmark
lab L2
	mark	L3
	mark	L4
	var	5
	str	1
	var	6
	line	313
	colm	25
	keywd	features
	line	313
	colm	24
	invoke	1
	line	313
	colm	13
	invoke	2
	esusp
	goto	L5
lab L4
	var	7
	str	2
	line	314
	colm	17
	invoke	1
lab L5
	unmark
lab L3
	mark	L6
	pnull
	var	1
	var	8
	str	3
	str	4
	line	315
	colm	32
	invoke	2
	line	315
	colm	25
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	3
	pnull
	var	1
	line	316
	colm	25
	bang
	line	316
	colm	22
	asgn
	unmark
lab L7
	mark	L8
	var	9
	var	1
	line	317
	colm	14
	invoke	1
	unmark
lab L8
	var	3
	line	318
	colm	22
	bscan
	mark	L9
	mark0
	pnull
	int	5
	int	6
	push1
	line	322
	colm	21
	toby
	pop
	mark0
	var	10
	pnull
	var	5
	str	7
	line	322
	colm	37
	invoke	1
	int	5
	line	322
	colm	42
	plus
	line	322
	colm	32
	invoke	1
	unmark
lab L10
	efail
lab L11
	unmark
lab L9
	mark	L12
	pnull
	var	11
	var	12
	str	8
	str	9
	str	10
	str	11
	line	323
	colm	34
	invoke	4
	line	323
	colm	18
	asgn
	unmark
lab L12
	mark	L13
	mark0
	pnull
	var	2
	pnull
	int	5
	int	12
	push1
	line	324
	colm	26
	toby
	line	324
	colm	21
	asgn
	pop
	mark0
	mark	L16
	pnull
	pnull
	var	11
	var	2
	line	325
	colm	21
	subsc
	var	13
	var	14
	pnull
	str	13
	var	10
	var	5
	str	7
	line	325
	colm	56
	invoke	1
	line	325
	colm	51
	invoke	1
	line	325
	colm	46
	cat
	line	325
	colm	40
	invoke	1
	line	325
	colm	32
	invoke	1
	line	325
	colm	25
	asgn
	unmark
lab L16
	var	15
	int	5
	line	326
	colm	21
	invoke	1
	unmark
lab L14
	efail
lab L15
	unmark
lab L13
	pnull
	pnull
	var	11
	pnull
	var	2
	int	5
	line	328
	colm	19
	plus
	line	328
	colm	17
	subsc
	var	13
	var	14
	pnull
	str	13
	var	10
	int	14
	line	328
	colm	49
	invoke	1
	line	328
	colm	44
	cat
	line	328
	colm	38
	invoke	1
	line	328
	colm	30
	invoke	1
	line	328
	colm	23
	asgn
	line	318
	colm	22
	escan
	unmark
lab L1
	mark	L17
	mark	L18
	pnull
	var	0
	str	15
	line	332
	colm	15
	lexeq
	unmark
	var	16
	str	16
	line	333
	colm	16
	invoke	1
	goto	L19
lab L18
	var	16
	pnull
	str	17
	var	3
	line	334
	colm	29
	cat
	line	334
	colm	16
	invoke	1
lab L19
	unmark
lab L17
	mark	L20
	mark	L21
	pnull
	line	336
	colm	5
	pret
lab L21
	pfail
	unmark
lab L20
	pnull
	line	338
	colm	1
	pfail
	end
