version	U12.1.00
uid	bitplane.u1-1784908815-0
impl	error
global	6
	0,000001,Plane_Mask,0
	1,000005,AlcPlane,2
	2,000005,FrontPlane,3
	3,000005,BackPlane,3
	4,000005,PlaneOp,3
	5,000005,Deplane,2

proc AlcPlane
	local	0,001000,win
	local	1,001000,n
	local	2,000020,ncolors
	local	3,000020,mask
	local	4,000020,b
	local	5,000020,seqlen
	local	6,000020,prev
	local	7,000020,fg
	local	8,000020,clist
	local	9,000000,type
	local	10,000000,runerr
	local	11,000000,Fg
	local	12,000000,NewColor
	local	13,000000,iand
	local	14,000000,push
	local	15,000000,pop
	local	16,000000,FreeColor
	local	17,000000,Color
	local	18,000000,Bg
	local	19,000000,Plane_Mask
	local	20,000000,table
	con	0,010000,6,167,151,156,144,157,167
	con	1,002000,1,1
	con	2,002000,1,7
	con	3,002000,3,205
	con	4,002000,1,2
	con	5,010000,5,142,154,141,143,153
	con	6,002000,1,0
	con	7,010000,5,167,150,151,164,145
	declend
	filen	bitplane.icn
	line	199
	colm	11
	synt	any
	mark	L1
	line	202
	colm	4
	synt	if
	mark0
	pnull
	var	9
	var	0
	line	202
	colm	11
	synt	any
	invoke	1
	str	0
	line	202
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	1
	var	0
	line	203
	colm	9
	synt	any
	asgn
	unmark
lab L2
	pnull
	var	0
	line	204
	colm	14
	synt	any
	keywd	window
	line	204
	colm	11
	synt	any
	asgn
	line	202
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	line	207
	colm	4
	synt	if
	mark0
	mark	L4
	pnull
	var	1
	int	1
	line	207
	colm	9
	synt	any
	numlt
	line	207
	colm	13
	synt	any
	esusp
	goto	L5
lab L4
	pnull
	var	1
	int	2
	line	207
	colm	17
	synt	any
	numgt
lab L5
	unmark
	var	10
	int	3
	var	1
	line	208
	colm	13
	synt	any
	invoke	2
	line	207
	colm	4
	synt	endif
	unmark
lab L3
	mark	L6
	pnull
	var	7
	var	11
	var	0
	line	209
	colm	12
	synt	any
	invoke	1
	line	209
	colm	7
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	2
	pnull
	int	4
	var	1
	line	211
	colm	17
	synt	any
	power
	line	211
	colm	12
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	3
	pnull
	var	2
	int	1
	line	212
	colm	20
	synt	any
	minus
	line	212
	colm	9
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	pnull
	var	4
	mark	L10
	var	12
	var	0
	mark	L12
	var	7
	line	219
	colm	26
	synt	any
	esusp
	goto	L13
lab L12
	str	5
lab L13
	line	219
	colm	17
	synt	any
	invoke	2
	line	219
	colm	37
	synt	any
	esusp
	goto	L11
lab L10
	line	219
	colm	39
	synt	any
	pfail
lab L11
	line	219
	colm	6
	synt	any
	asgn
	unmark
lab L9
	mark	L14
	pnull
	var	8
	pnull
	var	4
	line	220
	colm	13
	synt	any
	llist	1
	line	220
	colm	10
	synt	any
	asgn
	unmark
lab L14
	mark	L15
	pnull
	var	5
	int	1
	line	221
	colm	11
	synt	any
	asgn
	unmark
lab L15
	mark	L16
lab L17
	line	222
	colm	4
	synt	while
	mark0
	mark	L20
	pnull
	var	5
	var	2
	line	222
	colm	17
	synt	any
	numlt
	line	222
	colm	27
	synt	any
	esusp
	goto	L21
lab L20
	pnull
	var	13
	pnull
	pnull
	int	1
	line	222
	colm	34
	synt	any
	neg
	var	4
	line	222
	colm	37
	synt	any
	minus
	var	3
	line	222
	colm	33
	synt	any
	invoke	2
	var	3
	line	222
	colm	48
	synt	any
	numne
lab L21
	unmark
	mark	L17
	mark	L22
	pnull
	var	6
	var	4
	line	223
	colm	12
	synt	any
	asgn
	unmark
lab L22
	mark	L23
	pnull
	var	4
	mark	L24
	var	12
	var	0
	mark	L26
	var	7
	line	224
	colm	29
	synt	any
	esusp
	goto	L27
lab L26
	str	5
lab L27
	line	224
	colm	20
	synt	any
	invoke	2
	line	224
	colm	40
	synt	any
	esusp
	goto	L25
lab L24
	line	224
	colm	42
	synt	any
	pfail
lab L25
	line	224
	colm	9
	synt	any
	asgn
	unmark
lab L23
	mark	L28
	var	14
	var	8
	var	4
	line	225
	colm	11
	synt	any
	invoke	2
	unmark
lab L28
	line	226
	colm	7
	synt	ifelse
	mark	L29
	pnull
	pnull
	var	6
	var	4
	line	226
	colm	15
	synt	any
	minus
	int	1
	line	226
	colm	19
	synt	any
	numne
	unmark
	pnull
	var	5
	int	1
	line	227
	colm	17
	synt	any
	asgn
	goto	L30
lab L29
	pnull
	var	5
	dup
	int	1
	line	229
	colm	17
	synt	any
	plus
	asgn
lab L30
	line	226
	colm	7
	synt	endifelse
lab L18
	unmark
	goto	L17
lab L19
	line	222
	colm	4
	synt	endwhile
	unmark
lab L16
	mark	L31
	line	233
	colm	4
	synt	every
	mark0
	pnull
	int	1
	var	2
	push1
	line	233
	colm	12
	synt	any
	toby
	pop
	mark0
	var	15
	var	8
	line	234
	colm	10
	synt	any
	invoke	1
	unmark
lab L32
	efail
lab L33
	line	233
	colm	4
	synt	endevery
	unmark
lab L31
	mark	L34
	line	235
	colm	4
	synt	if
	mark0
	pnull
	pnull
	var	8
	line	235
	colm	7
	synt	any
	size
	int	6
	line	235
	colm	14
	synt	any
	numgt
	unmark
	mark	L35
	var	14
	var	8
	var	0
	line	236
	colm	11
	synt	any
	invoke	2
	unmark
lab L35
	var	16
	var	8
	invoke	-1
	line	235
	colm	4
	synt	endif
	unmark
lab L34
	mark	L36
	var	17
	var	0
	var	4
	mark	L37
	var	18
	var	0
	line	241
	colm	20
	synt	any
	invoke	1
	line	241
	colm	26
	synt	any
	esusp
	goto	L38
lab L37
	str	7
lab L38
	line	241
	colm	9
	synt	any
	invoke	3
	unmark
lab L36
	mark	L39
	pnull
	pnull
	var	19
	line	242
	colm	4
	synt	any
	null
	var	20
	line	242
	colm	24
	synt	any
	invoke	0
	line	242
	colm	16
	synt	any
	asgn
	unmark
lab L39
	mark	L40
	line	243
	colm	4
	synt	every
	mark0
	pnull
	pnull
	var	19
	pnull
	var	4
	pnull
	var	4
	var	3
	line	243
	colm	29
	synt	any
	plus
	push1
	line	243
	colm	24
	synt	any
	toby
	line	243
	colm	21
	synt	any
	subsc
	var	3
	line	243
	colm	37
	synt	any
	asgn
	pop
lab L41
	efail
lab L42
	line	243
	colm	4
	synt	endevery
	unmark
lab L40
	mark	L43
	mark	L44
	var	4
	line	244
	colm	4
	synt	any
	pret
lab L44
	synt	any
	pfail
	unmark
lab L43
	pnull
	line	245
	colm	1
	synt	any
	pfail
	end
proc FrontPlane
	local	0,001000,win
	local	1,001000,bp
	local	2,001000,color
	local	3,000020,mask
	local	4,000020,base
	local	5,000020,bits
	local	6,000020,i
	local	7,000000,type
	local	8,000000,Plane_Mask
	local	9,000000,runerr
	local	10,000000,iand
	local	11,000000,icom
	local	12,000000,Color
	con	0,010000,6,167,151,156,144,157,167
	con	1,002000,3,205
	declend
	line	251
	colm	11
	synt	any
	mark	L1
	line	254
	colm	4
	synt	if
	mark0
	pnull
	var	7
	var	0
	line	254
	colm	11
	synt	any
	invoke	1
	str	0
	line	254
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	var	2
	line	255
	colm	18
	synt	any
	swap
	line	255
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	256
	colm	14
	synt	any
	keywd	window
	line	256
	colm	11
	synt	any
	asgn
	line	254
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	var	3
	mark	L4
	pnull
	pnull
	var	8
	var	1
	line	259
	colm	23
	synt	any
	subsc
	line	259
	colm	12
	synt	any
	nonnull
	line	259
	colm	28
	synt	any
	esusp
	goto	L5
lab L4
	var	9
	int	1
	var	1
	line	259
	colm	36
	synt	any
	invoke	2
lab L5
	line	259
	colm	9
	synt	any
	asgn
	unmark
lab L3
	mark	L6
	pnull
	var	4
	var	10
	var	11
	var	3
	line	260
	colm	21
	synt	any
	invoke	1
	var	1
	line	260
	colm	16
	synt	any
	invoke	2
	line	260
	colm	9
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	5
	pnull
	var	1
	var	4
	line	261
	colm	15
	synt	any
	minus
	line	261
	colm	9
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	pnull
	var	2
	line	262
	colm	4
	synt	any
	null
	var	1
	line	262
	colm	11
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	line	263
	colm	4
	synt	every
	mark0
	pnull
	var	6
	pnull
	var	4
	pnull
	var	4
	var	3
	line	263
	colm	28
	synt	any
	plus
	push1
	line	263
	colm	20
	synt	any
	toby
	line	263
	colm	12
	synt	any
	asgn
	pop
	mark0
	line	264
	colm	7
	synt	if
	mark0
	pnull
	var	10
	var	6
	var	5
	line	264
	colm	14
	synt	any
	invoke	2
	var	5
	line	264
	colm	24
	synt	any
	numeq
	unmark
	var	12
	var	0
	var	6
	var	2
	line	265
	colm	15
	synt	any
	invoke	3
	line	264
	colm	7
	synt	endif
	unmark
lab L10
	efail
lab L11
	line	263
	colm	4
	synt	endevery
	unmark
lab L9
	mark	L12
	mark	L13
	var	0
	line	266
	colm	4
	synt	any
	pret
lab L13
	synt	any
	pfail
	unmark
lab L12
	pnull
	line	267
	colm	1
	synt	any
	pfail
	end
proc BackPlane
	local	0,001000,win
	local	1,001000,bp
	local	2,001000,color
	local	3,000020,mask
	local	4,000020,base
	local	5,000020,bits
	local	6,000020,i
	local	7,000000,type
	local	8,000000,Plane_Mask
	local	9,000000,runerr
	local	10,000000,iand
	local	11,000000,icom
	local	12,000000,Color
	local	13,000000,ixor
	con	0,010000,6,167,151,156,144,157,167
	con	1,002000,3,205
	declend
	line	273
	colm	11
	synt	any
	mark	L1
	line	276
	colm	4
	synt	if
	mark0
	pnull
	var	7
	var	0
	line	276
	colm	11
	synt	any
	invoke	1
	str	0
	line	276
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	var	2
	line	277
	colm	18
	synt	any
	swap
	line	277
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	278
	colm	14
	synt	any
	keywd	window
	line	278
	colm	11
	synt	any
	asgn
	line	276
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	var	3
	mark	L4
	pnull
	pnull
	var	8
	var	1
	line	281
	colm	23
	synt	any
	subsc
	line	281
	colm	12
	synt	any
	nonnull
	line	281
	colm	28
	synt	any
	esusp
	goto	L5
lab L4
	var	9
	int	1
	var	1
	line	281
	colm	36
	synt	any
	invoke	2
lab L5
	line	281
	colm	9
	synt	any
	asgn
	unmark
lab L3
	mark	L6
	pnull
	var	4
	var	10
	var	11
	var	3
	line	282
	colm	21
	synt	any
	invoke	1
	var	1
	line	282
	colm	16
	synt	any
	invoke	2
	line	282
	colm	9
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	5
	pnull
	var	1
	var	4
	line	283
	colm	15
	synt	any
	minus
	line	283
	colm	9
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	var	12
	var	0
	var	1
	pnull
	var	2
	line	284
	colm	19
	synt	any
	nonnull
	line	284
	colm	9
	synt	any
	invoke	3
	unmark
lab L8
	mark	L9
	line	285
	colm	4
	synt	every
	mark0
	pnull
	var	6
	pnull
	var	4
	pnull
	var	4
	var	3
	line	285
	colm	28
	synt	any
	plus
	push1
	line	285
	colm	20
	synt	any
	toby
	line	285
	colm	12
	synt	any
	asgn
	pop
	mark0
	line	286
	colm	7
	synt	if
	mark0
	pnull
	var	10
	var	6
	var	5
	line	286
	colm	14
	synt	any
	invoke	2
	var	5
	line	286
	colm	24
	synt	any
	numeq
	pop
	pnull
	var	6
	var	1
	line	286
	colm	35
	synt	any
	numne
	unmark
	var	12
	var	0
	var	6
	var	13
	var	6
	var	5
	line	287
	colm	28
	synt	any
	invoke	2
	line	287
	colm	15
	synt	any
	invoke	3
	line	286
	colm	7
	synt	endif
	unmark
lab L10
	efail
lab L11
	line	285
	colm	4
	synt	endevery
	unmark
lab L9
	mark	L12
	mark	L13
	var	0
	line	288
	colm	4
	synt	any
	pret
lab L13
	synt	any
	pfail
	unmark
lab L12
	pnull
	line	289
	colm	1
	synt	any
	pfail
	end
proc PlaneOp
	local	0,001000,win
	local	1,001000,bp
	local	2,001000,op
	local	3,000020,mask
	local	4,000020,base
	local	5,000020,bits
	local	6,000020,i
	local	7,000000,type
	local	8,000000,Plane_Mask
	local	9,000000,runerr
	local	10,000000,iand
	local	11,000000,icom
	local	12,000000,WAttrib
	local	13,000000,Fg
	con	0,010000,6,167,151,156,144,157,167
	con	1,002000,3,205
	con	2,010000,4,143,157,160,171
	con	3,010000,11,144,162,141,167,157,160,075,143,157,160,171
	con	4,010000,3,163,145,164
	con	5,010000,10,144,162,141,167,157,160,075,141,156,144
	con	6,010000,5,143,154,145,141,162
	con	7,010000,9,144,162,141,167,157,160,075,157,162
	declend
	line	295
	colm	11
	synt	any
	mark	L1
	line	298
	colm	4
	synt	if
	mark0
	pnull
	var	7
	var	0
	line	298
	colm	11
	synt	any
	invoke	1
	str	0
	line	298
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	var	2
	line	299
	colm	18
	synt	any
	swap
	line	299
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	300
	colm	14
	synt	any
	keywd	window
	line	300
	colm	11
	synt	any
	asgn
	line	298
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	var	3
	mark	L4
	pnull
	pnull
	var	8
	var	1
	line	303
	colm	23
	synt	any
	subsc
	line	303
	colm	12
	synt	any
	nonnull
	line	303
	colm	28
	synt	any
	esusp
	goto	L5
lab L4
	var	9
	int	1
	var	1
	line	303
	colm	36
	synt	any
	invoke	2
lab L5
	line	303
	colm	9
	synt	any
	asgn
	unmark
lab L3
	mark	L6
	pnull
	var	4
	var	10
	var	11
	var	3
	line	304
	colm	21
	synt	any
	invoke	1
	var	1
	line	304
	colm	16
	synt	any
	invoke	2
	line	304
	colm	9
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	5
	pnull
	var	1
	var	4
	line	305
	colm	15
	synt	any
	minus
	line	305
	colm	9
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	line	307
	colm	4
	synt	case
	mark0
	var	2
	eret
	mark	L10
	ccase
	str	2
	line	308
	colm	13
	synt	any
	eqv
	unmark
	pop
	mark	L11
	var	12
	var	0
	str	3
	line	309
	colm	17
	synt	any
	invoke	2
	unmark
lab L11
	var	13
	var	0
	var	1
	line	310
	colm	12
	synt	any
	invoke	2
	goto	L9
lab L10
	mark	L12
	ccase
	str	4
	line	312
	colm	12
	synt	any
	eqv
	unmark
	pop
	mark	L13
	pnull
	var	6
	pnull
	var	4
	var	5
	line	313
	colm	20
	synt	any
	plus
	line	313
	colm	12
	synt	any
	asgn
	unmark
lab L13
	mark	L14
	var	12
	var	0
	str	5
	line	314
	colm	17
	synt	any
	invoke	2
	unmark
lab L14
	var	13
	var	0
	var	6
	line	315
	colm	12
	synt	any
	invoke	2
	goto	L9
lab L12
	mark	L15
	ccase
	str	6
	line	317
	colm	14
	synt	any
	eqv
	unmark
	pop
	mark	L16
	pnull
	var	6
	pnull
	var	4
	pnull
	var	3
	var	5
	line	318
	colm	28
	synt	any
	minus
	line	318
	colm	20
	synt	any
	plus
	line	318
	colm	12
	synt	any
	asgn
	unmark
lab L16
	mark	L17
	var	12
	var	0
	str	7
	line	319
	colm	17
	synt	any
	invoke	2
	unmark
lab L17
	var	13
	var	0
	var	6
	line	320
	colm	12
	synt	any
	invoke	2
	goto	L9
lab L15
	pop
	var	9
	int	1
	var	2
	line	323
	colm	16
	synt	any
	invoke	2
lab L9
	line	307
	colm	4
	synt	endcase
	unmark
lab L8
	mark	L18
	mark	L19
	var	0
	line	325
	colm	4
	synt	any
	pret
lab L19
	synt	any
	pfail
	unmark
lab L18
	pnull
	line	326
	colm	1
	synt	any
	pfail
	end
proc Deplane
	local	0,001000,win
	local	1,001000,color
	local	2,000000,type
	local	3,000000,WAttrib
	local	4,000000,Fg
	con	0,010000,6,167,151,156,144,157,167
	con	1,010000,11,144,162,141,167,157,160,075,143,157,160,171
	declend
	line	332
	colm	11
	synt	any
	mark	L1
	line	334
	colm	4
	synt	if
	mark0
	pnull
	var	2
	var	0
	line	334
	colm	11
	synt	any
	invoke	1
	str	0
	line	334
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	1
	var	0
	line	335
	colm	13
	synt	any
	asgn
	unmark
lab L2
	pnull
	var	0
	line	336
	colm	14
	synt	any
	keywd	window
	line	336
	colm	11
	synt	any
	asgn
	line	334
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	var	3
	var	0
	str	1
	line	338
	colm	11
	synt	any
	invoke	2
	unmark
lab L3
	mark	L4
	var	4
	var	0
	pnull
	var	1
	line	339
	colm	12
	synt	any
	nonnull
	line	339
	colm	6
	synt	any
	invoke	2
	unmark
lab L4
	mark	L5
	mark	L6
	var	0
	line	340
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	341
	colm	1
	synt	any
	pfail
	end
