proc pack
	filen	packunpk.icn
	local	0,001000,num
	local	1,001000,width
	local	2,000020,int
	local	3,000020,sign
	local	4,000020,prep
	local	5,000020,packed
	local	6,000020,word
	local	7,000000,integer
	local	8,000000,string
	local	9,000000,abs
	local	10,000000,move
	local	11,000000,pos
	local	12,000000,char
	local	13,000000,ord
	local	14,000000,right
	con	0,002000,1,0
	con	1,010000,1,075
	con	2,010000,0
	con	3,002000,1,2
	con	4,010000,1,060
	con	5,002000,1,1
	con	6,002000,2,16
	con	7,002000,2,48
	con	8,010000,1,000
	declend
	line	50
	colm	11
	mark	L1
	pnull
	var	2
	mark	L2
	var	7
	var	0
	line	54
	colm	19
	invoke	1
	esusp
	goto	L3
lab L2
	line	54
	colm	27
	pfail
lab L3
	line	54
	colm	9
	asgn
	unmark
lab L1
	mark	L4
	mark	L5
	pnull
	var	2
	int	0
	line	60
	colm	12
	numlt
	unmark
	pnull
	var	3
	str	1
	line	60
	colm	26
	asgn
	goto	L6
lab L5
	pnull
	var	3
	str	2
	line	60
	colm	43
	asgn
lab L6
	unmark
lab L4
	mark	L7
	pnull
	var	4
	pnull
	var	8
	var	9
	var	2
	line	61
	colm	25
	invoke	1
	line	61
	colm	21
	invoke	1
	var	3
	line	61
	colm	32
	cat
	line	61
	colm	12
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	5
	str	2
	line	62
	colm	12
	asgn
	unmark
lab L8
	mark	L9
	mark0
	pnull
	pnull
	pnull
	var	4
	line	63
	colm	9
	size
	int	3
	line	63
	colm	15
	mod
	int	0
	line	63
	colm	20
	numne
	unmark
	pnull
	var	4
	pnull
	str	4
	var	4
	line	63
	colm	42
	cat
	line	63
	colm	35
	asgn
	unmark
lab L9
	mark	L10
	var	4
	line	65
	colm	10
	bscan
lab L11
	mark0
	pnull
	var	6
	var	10
	int	3
	line	66
	colm	27
	invoke	1
	line	66
	colm	20
	asgn
	unmark
	mark	L11
	mark	L14
	var	11
	int	0
	line	67
	colm	19
	invoke	1
	unmark
	pnull
	var	5
	dup
	var	12
	pnull
	pnull
	pnull
	var	7
	pnull
	var	6
	int	5
	line	68
	colm	47
	subsc
	line	68
	colm	42
	invoke	1
	int	6
	line	68
	colm	51
	mult
	var	13
	pnull
	var	6
	int	3
	line	68
	colm	65
	subsc
	line	68
	colm	60
	invoke	1
	line	68
	colm	55
	plus
	int	7
	line	68
	colm	69
	minus
	line	68
	colm	34
	invoke	1
	line	68
	colm	25
	cat
	asgn
	goto	L15
lab L14
	pnull
	var	5
	dup
	var	12
	pnull
	pnull
	var	7
	pnull
	var	6
	int	5
	line	69
	colm	47
	subsc
	line	69
	colm	42
	invoke	1
	int	6
	line	69
	colm	51
	mult
	var	7
	pnull
	var	6
	int	3
	line	69
	colm	69
	subsc
	line	69
	colm	64
	invoke	1
	line	69
	colm	55
	plus
	line	69
	colm	34
	invoke	1
	line	69
	colm	25
	cat
	asgn
lab L15
lab L12
	unmark
	goto	L11
lab L13
	line	65
	colm	10
	escan
	unmark
lab L10
	mark	L16
	pnull
	pnull
	var	1
	line	73
	colm	5
	null
	pnull
	var	5
	line	73
	colm	15
	size
	line	73
	colm	12
	asgn
	unmark
lab L16
	mark	L17
	mark	L18
	var	14
	var	5
	var	1
	str	8
	line	74
	colm	17
	invoke	3
	line	74
	colm	5
	pret
lab L18
	pfail
	unmark
lab L17
	pnull
	line	76
	colm	1
	pfail
	end
proc unpack
	local	0,001000,val
	local	1,001000,width
	local	2,000020,tmp
	local	3,000020,number
	local	4,000020,tens
	local	5,000020,ones
	local	6,000020,sign
	local	7,000000,ord
	local	8,000000,right
	local	9,000000,map
	local	10,000000,radcon
	local	11,000000,string
	con	0,010000,0
	con	1,002000,1,1
	con	2,002000,2,10
	con	3,002000,2,16
	con	4,002000,1,2
	con	5,010000,1,060
	con	6,010000,1,102
	con	7,010000,1,104
	declend
	line	80
	colm	11
	mark	L1
	pnull
	var	2
	str	0
	line	87
	colm	10
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	6
	int	1
	line	88
	colm	10
	asgn
	unmark
lab L2
	mark	L3
	mark0
	pnull
	var	3
	var	7
	pnull
	var	0
	line	90
	colm	25
	bang
	line	90
	colm	24
	invoke	1
	line	90
	colm	18
	asgn
	pop
	mark0
	pnull
	var	2
	dup
	var	8
	var	9
	var	10
	var	3
	int	2
	int	3
	line	91
	colm	34
	invoke	3
	line	91
	colm	49
	keywd	lcase
	line	91
	colm	56
	keywd	ucase
	line	91
	colm	27
	invoke	3
	int	4
	str	5
	line	91
	colm	23
	invoke	3
	line	91
	colm	13
	cat
	asgn
	unmark
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L6
	mark0
	pnull
	pnull
	var	2
	pnull
	int	1
	line	93
	colm	12
	neg
	line	93
	colm	11
	subsc
	mark	L7
	str	6
	esusp
	goto	L8
lab L7
	str	7
lab L8
	line	93
	colm	16
	lexeq
	unmark
	mark	L9
	pnull
	var	6
	pnull
	int	1
	line	94
	colm	17
	neg
	line	94
	colm	14
	asgn
	unmark
lab L9
	pnull
	pnull
	var	2
	pnull
	int	1
	line	99
	colm	13
	neg
	line	99
	colm	12
	subsc
	str	0
	line	99
	colm	17
	asgn
	unmark
lab L6
	mark	L10
	pnull
	var	2
	dup
	var	6
	line	101
	colm	12
	mult
	asgn
	unmark
lab L10
	mark	L11
	pnull
	pnull
	var	1
	line	102
	colm	5
	null
	pnull
	var	11
	var	2
	line	102
	colm	23
	invoke	1
	line	102
	colm	16
	size
	line	102
	colm	13
	asgn
	unmark
lab L11
	mark	L12
	mark	L13
	var	8
	var	11
	var	2
	line	104
	colm	24
	invoke	1
	var	1
	line	104
	colm	17
	invoke	2
	line	104
	colm	5
	pret
lab L13
	pfail
	unmark
lab L12
	pnull
	line	106
	colm	1
	pfail
	end
proc unpack2
	local	0,001000,val
	local	1,000020,unpacked
	local	2,000020,int
	local	3,000000,ord
	local	4,000000,move
	local	5,000000,string
	local	6,000000,iand
	local	7,000000,pos
	local	8,000000,integer
	con	0,010000,0
	con	1,002000,1,1
	con	2,002000,10,2r11110000
	con	3,002000,2,16
	con	4,002000,1,0
	con	5,002000,10,2r00001111
	con	6,002000,2,13
	con	7,010000,1,055
	declend
	line	110
	colm	11
	mark	L1
	pnull
	var	1
	str	0
	line	118
	colm	14
	asgn
	unmark
lab L1
	mark	L2
	var	0
	line	119
	colm	9
	bscan
lab L3
	mark0
	pnull
	var	2
	var	3
	var	4
	int	1
	line	120
	colm	30
	invoke	1
	line	120
	colm	25
	invoke	1
	line	120
	colm	19
	asgn
	unmark
	mark	L3
	mark	L6
	pnull
	var	1
	dup
	var	5
	pnull
	var	6
	int	2
	var	2
	line	121
	colm	38
	invoke	2
	int	3
	line	121
	colm	55
	div
	line	121
	colm	33
	invoke	1
	line	121
	colm	22
	cat
	asgn
	unmark
lab L6
	mark	L7
	mark0
	var	7
	int	4
	line	122
	colm	19
	invoke	1
	unmark
	mark0
	pnull
	var	6
	int	5
	var	2
	line	123
	colm	24
	invoke	2
	int	6
	line	123
	colm	41
	numeq
	unmark
	mark	L8
	pnull
	var	1
	pnull
	str	7
	var	1
	line	124
	colm	37
	cat
	line	124
	colm	30
	asgn
	unmark
lab L8
	unmark
	unmark
	pnull
	goto	L5
	unmark
lab L7
	pnull
	var	1
	dup
	var	5
	var	6
	int	5
	var	2
	line	128
	colm	38
	invoke	2
	line	128
	colm	33
	invoke	1
	line	128
	colm	22
	cat
	asgn
lab L4
	unmark
	goto	L3
lab L5
	line	119
	colm	9
	escan
	unmark
lab L2
	mark	L9
	mark	L10
	var	8
	var	1
	line	132
	colm	19
	invoke	1
	line	132
	colm	5
	pret
lab L10
	pfail
	unmark
lab L9
	pnull
	line	134
	colm	1
	pfail
	end
