h09449
s 00092/00061/00556
d D 1.2 83/03/17 17:03:05 tes 2 1
c update
e
s 00617/00000/00000
d D 1.1 83/03/17 15:34:35 tes 1 0
c date and time created 83/03/17 15:34:35 by tes
e
u
4
U
t
T
I 1
DEFCGBL	equ	0c1h			; define global in code segment
DEFDGBL	equ	0c2h			; define global in data segment
RELCGBL	equ	0c3h			; relative address of global in code
ABSCGBL	equ	0c4h			; absolute address of global in code
	cseg
dlocal	rw	0
masks	db	80h, 40h, 20h, 10h, 08h, 04h, 02h, 01h
routines dw	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
	dw	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
glo_adj_64	equ	$-64
glo_adj_62	equ	$-62
glo_adj_60	equ	$-60
glo_adj_58	equ	$-58
glo_adj_56	equ	$-56
glo_adj_54	equ	$-54
glo_adj_52	equ	$-52
glo_adj_50	equ	$-50
glo_adj_48	equ	$-48
glo_adj_46	equ	$-46
glo_adj_44	equ	$-44
glo_adj_42	equ	$-42
glo_adj_40	equ	$-40
glo_adj_38	equ	$-38
glo_adj_36	equ	$-36
glo_adj_34	equ	$-34
glo_adj_32	equ	$-32
glo_adj_30	equ	$-30
glo_adj_28	equ	$-28
glo_adj_26	equ	$-26
glo_adj_24	equ	$-24
glo_adj_22	equ	$-22
glo_adj_20	equ	$-20
glo_adj_18	equ	$-18
glo_adj_16	equ	$-16
glo_adj_14	equ	$-14
glo_adj_12	equ	$-12
glo_adj_10	equ	$-10
glo_adj_8	equ	$-8
glo_adj_6	equ	$-6
glo_adj_4	equ	$-4
glo_adj_2	equ	$-2
;
; detipg () - erase graphics planes on TI Pegasus (set all bits to index 0)
;
detipg:
	push	es			; save es segment register
	pushf				; save flags
	cld				; set direction flag for autoincrement
     	mov	bx,0c000h		; load start address of plane a
	mov	es,bx
	mov	cx,27600/2     		; fill entire plane in index 0
	mov	di,0
	mov	ax,0
  rep	stosw
	mov	bx,0c800h		; load start address of plane b
	mov	es,bx
	mov	cx,27600/2		; fill entire plane in index 0
	mov	di,0
	mov	ax,0
  rep	stosw
	mov	bx,0d000h		; load start address of plane c
	mov	es,bx
	mov	cx,27600/2		; fill entire plane in index 0
	mov	di,0
	mov	ax,0
  rep	stosw
	popf				; restore flags
	pop	es			; restore es segment register
	ret
;
; eralpha () - erase alpha plane on TI Pegasus (set all bits to index 0)
;
eralpha:
	push	es			; save es segment register
	pushf				; save flags
	cld				; set direction flag for autoincrement
     	mov	bx,0de00h		; load start address of alpha plane
	mov	es,bx
	mov	cx,0800h     		; fill entire plane in index 0
	mov	di,0
	mov	ax,0
  rep	stosw
	popf				; restore registers
	pop	es
	ret
;
;  dctipg (red, green, blue) - set color registers on TI Pegasus
;       red, green, blue - color registers (integer)
;
dctipg:
	push	bp			; save base pointer
	mov	bp,sp			; set up for stack access
	push	es			; save es segment register
   	mov	di,4			; di = offset of color regs in stack
	mov	bx,0df00h		; set up to access color map regs
	mov	es,bx
D 2
	mov	si,010h			; si = offset of current color map reg
E 2
I 2
	mov	si,030h			; si = offset of current color map reg
E 2
	mov	cx,3			; loop over 3 colors (red, green, blue)
dctipg1:
      	mov	al,[bp+di]		; al = new color map register
	mov	es:[si],al		; store updated color map register
	inc	di			; di = updated offset to next color
	inc 	di
D 2
	add	si,010h			; si = offset of next color map reg
E 2
I 2
	sub	si,010h			; si = offset of next color map reg
E 2
					;      in memory
	loop	dctipg1
	pop	es			; restore es
	pop	bp			; restore bp
	ret
;
; ddflin (x1, x2, y, pattern, offset, color, writing mode) -
;      fill a portion of a raster line in the given pattern, color, etc
;   x1, x2 - limits of raster line
;   y      - raster line
;   pattern- pattern in which to draw raster line
;   offset - offset of starting position in pattern
;   color  - color of pattern
;   writing mode - mode in which to draw pattern
;
X1_FILL		equ	4[bp]
X2_FILL		equ	6[bp]
Y_FILL		equ	word ptr 8[bp]
PATTERN_FILL	equ	10[bp]
PAT_OFFSET	equ	12[bp]
COLOR_FILL	equ	14[bp]
MODE_FILL	equ	word ptr 16[bp]
;
ddflin:
	push	bp			; save base pointer
	mov	bp,sp			; set up for stack access
	mov	dx,PATTERN_FILL		; get fill pattern
	mov	cl,PAT_OFFSET		; get pattern offset
	rol	dx,cl			; rotate pattern to correct start pos
					; dx = pattern
	mov	cx,X2_FILL
	mov	bx,X1_FILL		; bx = current x-coordinate
	sub	cx,bx
	inc	cx			; cx = # of rasters to cover with pat
ddflin2:
	push	cx			; save count
	push	bx			; save x-coordinate
	push	dx			; save pattern
	push	MODE_FILL		; push writing mode for bitblt
	xor	si,si			; si = background color index - 0
	mov	ah,dh			; get high byte of pattern
	and	ah,080h			; is high order bit on ?
	jz	ddflin4			; no
	mov	si,COLOR_FILL		; yes, si = fill color index
ddflin4:
	push	si			; push color index for bitblt
	push	Y_FILL			; push y-coordinate for bitblt
	push	bx			; push x-coordinate for bitblt
	call	bitblt			; turn on bit in display
	add	sp,8			; remove bitblt parameters from stack
	pop	dx			; dx = pattern
	rol	dx,1			; move next bit of pattern into high
					;    order bit
	pop	bx			; bx = x-coordinate
	inc	bx			; update x-coordinate to next raster
	pop	cx			; cx = loop count
	loop	ddflin2			; loop if not done
;
	pop	bp			; restore bp
	ret
;
; integer function rdpixel (x, y)
;   x - x-coordinate (0-719) of bit
D 2
;   y - y-coordinate (0-299) of bit (0,0) is lower left hand corner
E 2
I 2
;   y - y-coordinate (0-287) of bit (0,0) is lower left hand corner
E 2
;
;   rdpixel - the color index associated with bit
;
XCOORD		equ	4[bp]		; address of x-coordinate in stack 
YCOORD 		equ	6[bp]		; address of y-coordinate in stack
I 2
YTOP		equ     287
E 2
rdpixel:
	push	bp			; save base pointer
	mov	bp,sp			; set up pointer into stack
	push	ds			; save data segment pointer
D 2
	mov	ax,299			; y=0 is top of screen so map
	sub	ax,YCOORD		;    input of 299 to 0, etc.
E 2
I 2
	mov	ax,YTOP			; y=0 is top of screen so map
	sub	ax,YCOORD		;    input of 287 to 0, etc.
E 2
	shl	ax,1			; row offset = row count * 92 bytes
					;    per row
	shl	ax,1
	mov	di,ax			; row count * 4
	shl	ax,1
	add	di,ax			; row count * 8
	shl	ax,1
	add	di,ax			; row count * 16
	shl	ax,1
	shl	ax,1
	add	di,ax			; row count * 64
					; di = partial byte offset = rowcnt*92
	mov	ax,XPARM		; get x-coordinate value
	mov	si,ax			; si = x-coordinate
	shr	ax,1			; ax = (x-coord / 16) * 2
	shr	ax,1
	shr	ax,1
	xor	al,1			; low byte is on right of word
	add	di,ax			; di = updated byte offset
	and	si,7			; si = bit offset in byte
	mov	dl,cs:masks[si]		; dl = bit mask from lookup table
glo_adj_71	equ	$-2
	xor	ax,ax			; ax = output index (initially 0)
					;      rdpixel function returned in ax
D 2
	mov	cx,3			; cx = number of planes (loop count)
	mov	si,0d000h		; si = base address of third bit plane
rdpixel2:
	shl	al,1			; make room for next bit of color index
E 2
I 2
	mov	si,0c800h		; si = base address of third bit plane
E 2
   	mov	ds,si			; get base address of current plane
	mov	dh,[di]   		; get byte to be examined
	and	dh,dl			; get appropriate bit
	jz	rdpixel4		; bit is not on
	inc	al			; bit is on
rdpixel4:
D 2
	sub	si,0800h		; update si to next bit plane base addr
	loop	rdpixel2		; branch if not done
E 2
I 2
	shl	al,1			; make room for next bit of color index
	add	si,0800h		; si = base addr of 2nd plane (d000)
   	mov	ds,si			; get base address of current plane
	mov	dh,[di]   		; get byte to be examined
	and	dh,dl			; get appropriate bit
	jz	rdpixel6		; bit is not on
	inc	al			; bit is on
rdpixel6:
	shl	al,1			; make room for next bit of color index
	sub	si,01000h		; si = base addr of 1st plane (c000)
   	mov	ds,si			; get base address of current plane
	mov	dh,[di]   		; get byte to be examined
	and	dh,dl			; get appropriate bit
	jz	rdpixel8		; bit is not on
	inc	al			; bit is on
rdpixel8:
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret	
;
; bitblt (x, y, color index, writing mode)
;   x - x-coordinate (0-719) of bit
D 2
;   y - y-coordinate (0-299) of bit (0,0) is lower left hand corner
E 2
I 2
;   y - y-coordinate (0-287) of bit (0,0) is lower left hand corner
E 2
;   color index - color index associated with bit
;   writing mode - 1 = replace
;                  2 = overstrike
;                  3 = xor
D 2
;                  4 = and
E 2
I 2
;                  4 = erase
E 2
;
XPARM		equ	4[bp]		; address of x-coordinate in stack 
YPARM 		equ	6[bp]		; address of y-coordinate in stack
COLORINDEX	equ	8[bp]		; address of color index in stack
WRITEMODE	equ	10[bp]		; address of writing mode in stack
bitblt:
	push	bp			; save base pointer
	mov	bp,sp			; set up pointer into stack
	push	ds			; save data segment pointer
D 2
	mov	ax,299			; y=0 is top of screen so map
	sub	ax,YPARM		;    input of 299 to 0, etc.
E 2
I 2
	mov	ax,YTOP			; y=0 is top of screen so map
	sub	ax,YPARM		;    input of 287 to 0, etc.
E 2
	shl	ax,1			; row offset = row count * 92 bytes
					;    per row
	shl	ax,1
	mov	di,ax			; row count * 4
	shl	ax,1
	add	di,ax			; row count * 8
	shl	ax,1
	add	di,ax			; row count * 16
	shl	ax,1
	shl	ax,1
	add	di,ax			; row count * 64
					; di = partial byte offset = rowcnt*92
	mov	ax,XPARM		; get x-coordinate value
	mov	si,ax			; si = x-coordinate
	shr	ax,1			; ax = (x-coord / 16) * 2
	shr	ax,1
	shr	ax,1
	xor	ax,1			; low byte is right half of word
	add	di,ax			; di = updated byte offset
	and	si,7			; si = bit offset in byte
	mov	dl,cs:masks[si]		; dl = bit mask from lookup table
glo_adj_72	equ	$-2
	mov	dh,dl			; dh = complement of bit mask
	not	dh
	mov	bx,di			; bx = total byte offset 
	mov	di,WRITEMODE    	; get writing mode
					; call appropriate bit routine
	dec	di			; di = index into routine call table
					;      0 - 3
	shl	di,1			; *2
	shl	di,1			; *4
	shl	di,1			; *8
	add	di,COLORINDEX		; mode*8+index in di
	shl	di,1			;  as word index
	mov	ax,0c000h		; point
	mov	ds,ax			; ds = base address of first plane
	mov	si,0d000h		; si = base addres of 3rd plane
	jmp 	cs:(word ptr routines)[di] ; call routine based on writing mode
glo_adj_70	equ	$-2

; <mode>_<index> where
;	<mode> is
;		set
;		or
;		xor
;		erase
;	<index> is 0..7 color index
 
; Upon entry:
;	dl contains bit mask
;	dh contains complement of bit mask
;	ds contains 0c000h
;	si contains 0d000h
;	bx contains offset to relevant byte in planes
 
I 2
; Note: Organization of bit planes
;       c000 - low order plane
;       d000 - middle order plane
;       c800 - high order plane

E 2
set_0:	and	byte ptr [bx],dh	; turn off plane 0 bit
D 2
	and	byte ptr .08000h[bx],dh	; turn off plane 1 bit
	mov	ds,si			; point to plane 2
	and	byte ptr [bx],dh	; turn off plane 2 bit
E 2
I 2
	and	byte ptr .08000h[bx],dh	; turn off plane 2 bit
	mov	ds,si			; point to plane 1
	and	byte ptr [bx],dh	; turn off plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
set_1:	or	byte ptr [bx],dl	; turn on plane 0 bit
D 2
	and	byte ptr .08000h[bx],dh	; turn off plane 1 bit
	mov	ds,si			; point to plane 2
	and	byte ptr [bx],dh	; turn off plane 2 bit
E 2
I 2
	and	byte ptr .08000h[bx],dh	; turn off plane 2 bit
	mov	ds,si			; point to plane 1
	and	byte ptr [bx],dh	; turn off plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
set_2:	and	byte ptr [bx],dh	; turn off plane 0 bit
D 2
	or	byte ptr .08000h[bx],dl	; turn on plane 1 bit
	mov	ds,si			; point to plane 2
	and	byte ptr [bx],dh	; turn off plane 2 bit
E 2
I 2
	and	byte ptr .08000h[bx],dh	; turn off plane 2 bit
	mov	ds,si			; point to plane 1
	or	byte ptr [bx],dl	; turn on plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
set_3:	or	byte ptr [bx],dl	; turn on plane 0 bit
D 2
	or	byte ptr .08000h[bx],dl	; turn on plane 1 bit
	mov	ds,si			; point to plane 2
	and	byte ptr [bx],dh	; turn off plane 2 bit
E 2
I 2
	and	byte ptr .08000h[bx],dh	; turn off plane 2 bit
	mov	ds,si			; point to plane 1
	or	byte ptr [bx],dl	; turn on plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
set_4:	and	byte ptr [bx],dh	; turn off plane 0 bit
D 2
	and	byte ptr .08000h[bx],dh	; turn off plane 1 bit
	mov	ds,si			; point to plane 2
	or	byte ptr [bx],dl	; turn on plane 2 bit
E 2
I 2
	or	byte ptr .08000h[bx],dl	; turn on plane 2 bit
	mov	ds,si			; point to plane 1
	and	byte ptr [bx],dh	; turn off plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
set_5:	or	byte ptr [bx],dl	; turn on plane 0 bit
D 2
	and	byte ptr .08000h[bx],dh	; turn off plane 1 bit
	mov	ds,si			; point to plane 2
	or	byte ptr [bx],dl	; turn on plane 2 bit
E 2
I 2
	or	byte ptr .08000h[bx],dl	; turn on plane 2 bit
	mov	ds,si			; point to plane 1
	and	byte ptr [bx],dh	; turn off plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
set_6:	and	byte ptr [bx],dh	; turn off plane 0 bit
D 2
	or	byte ptr .08000h[bx],dl	; turn on plane 1 bit
	mov	ds,si			; point to plane 2
	or	byte ptr [bx],dl	; turn on plane 2 bit
E 2
I 2
	or	byte ptr .08000h[bx],dl	; turn on plane 2 bit
	mov	ds,si			; point to plane 1
	or	byte ptr [bx],dl	; turn on plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
set_7:	or	byte ptr [bx],dl	; turn on plane 0 bit
D 2
	or	byte ptr .08000h[bx],dl	; turn on plane 1 bit
	mov	ds,si			; point to plane 2
	or	byte ptr [bx],dl	; turn on plane 2 bit
E 2
I 2
	or	byte ptr .08000h[bx],dl	; turn on plane 2 bit
	mov	ds,si			; point to plane 1
	or	byte ptr [bx],dl	; turn on plane 1 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
	eject
 
or_1:	or	byte ptr [bx],dl	; turn on plane 0 bit
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
or_3:	or	byte ptr [bx],dl	; turn on plane 0 bit
 
D 2
or_2:	or	byte ptr .08000h[bx],dl	; turn on plane 1 bit
E 2
I 2
or_2:
	mov	ds,si			; point to plane 1
	or	byte ptr [bx],dl	; turn on plane 1 bit
E 2
 
or_0:
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
or_5:	or	byte ptr [bx],dl	; turn on plane 0 bit
D 2
	mov	ds,si			; point to plane 2
	or	byte ptr [bx],dl	; turn on plane 2 bit
E 2
I 2
	or	byte ptr .08000h[bx],dl	; turn on plane 2 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
or_7:	or	byte ptr [bx],dl	; turn on plane 0 bit
 
D 2
or_6:	or	byte ptr .08000h[bx],dl	; turn on plane 1 bit
E 2
I 2
or_6:
	mov	di,ds			; save plane 0 address
	mov	ds,si			; point to plane 1
	or	byte ptr [bx],dl	; turn on plane 1 bit
	mov	ds,di			; get plane 0 address
E 2
 
D 2
or_4:	mov	ds,si			; point to plane 2
	or	byte ptr [bx],dl	; turn on plane 2 bit
E 2
I 2
or_4:	
	or	byte ptr .08000h[bx],dl	; turn on plane 2 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
	eject
 
D 2
xor_1:	xor	byte ptr [bx],dl	; toggle plane 0 bit
E 2
I 2
xor_1:	xor	byte ptr [bx],dl	; turn on plane 0 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
D 2
xor_3:	xor	byte ptr [bx],dl	; toggle plane 0 bit
E 2
I 2
xor_3:	xor	byte ptr [bx],dl	; turn on plane 0 bit
E 2
 
D 2
xor_2:	xor	byte ptr .08000h[bx],dl	; toggle plane 1 bit
E 2
I 2
xor_2:
	mov	ds,si			; point to plane 1
	xor	byte ptr [bx],dl	; turn on plane 1 bit
E 2
 
xor_0:
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
D 2
xor_5:	xor	byte ptr [bx],dl	; toggle plane 0 bit
	mov	ds,si			; point to plane 2
	xor	byte ptr [bx],dl	; toggle plane 2 bit
E 2
I 2
xor_5:	xor	byte ptr [bx],dl	; turn on plane 0 bit
	xor	byte ptr .08000h[bx],dl	; turn on plane 2 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
D 2
xor_7:	xor	byte ptr [bx],dl	; toggle plane 0 bit
E 2
I 2
xor_7:	xor	byte ptr [bx],dl	; turn on plane 0 bit
E 2
 
D 2
xor_6:	xor	byte ptr .08000h[bx],dl	; toggle plane 1 bit
E 2
I 2
xor_6:
	mov	di,ds			; save plane 0 address
	mov	ds,si			; point to plane 1
	xor	byte ptr [bx],dl	; turn on plane 1 bit
	mov	ds,di			; get plane 0 address
E 2
 
D 2
xor_4:	mov	ds,si			; point to plane 2
	xor	byte ptr [bx],dl	; toggle plane 2 bit
E 2
I 2
xor_4:	
	xor	byte ptr .08000h[bx],dl	; turn on plane 2 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
I 2
	eject
 
E 2
erase_1:
	and	byte ptr [bx],dh	; turn off plane 0 bit
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
erase_3:
	and	byte ptr [bx],dh	; turn off plane 0 bit
 
erase_2:
D 2
	and	byte ptr .08000h[bx],dh	; turn off plane 1 bit
E 2
I 2
	mov	ds,si			; point to plane 1
	and	byte ptr [bx],dh	; turn off plane 1 bit
E 2
 
erase_0:
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
erase_5:
	and	byte ptr [bx],dh	; turn off plane 0 bit
D 2
	mov	ds,si			; point to plane 2
	and	byte ptr [bx],dh	; turn off plane 2 bit
E 2
I 2
	and	byte ptr .08000h[bx],dh	; turn off plane 2 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
erase_7:
	and	byte ptr [bx],dh	; turn off plane 0 bit
 
erase_6:
D 2
	and	byte ptr .08000h[bx],dh	; turn off plane 1 bit
E 2
I 2
	mov	di,ds			; save plane 0 address
	mov	ds,si			; point to plane 1
	and	byte ptr [bx],dh	; turn on plane 1 bit
	mov	ds,di			; get plane 0 address
E 2
 
erase_4:
D 2
	mov	ds,si			; point to plane 2
	and	byte ptr [bx],dh	; turn off plane 2 bit
E 2
I 2
	and	byte ptr .08000h[bx],dh	; turn off plane 2 bit
E 2
	pop	ds			; restore ds
	pop	bp			; restore bp
	ret
 
 
	eseg
	dw	bitblt                  ; global defines for Computer Innov C
	db	DEFCGBL,'bitblt',0
	dw	set_0
	db	DEFCGBL,'set_0',0
	dw	set_1
	db	DEFCGBL,'set_1',0
	dw	set_2
	db	DEFCGBL,'set_2',0
	dw	set_3
	db	DEFCGBL,'set_3',0
	dw	set_4
	db	DEFCGBL,'set_4',0
	dw	set_5
	db	DEFCGBL,'set_5',0
	dw	set_6
	db	DEFCGBL,'set_6',0
	dw	set_7
	db	DEFCGBL,'set_7',0
	dw	or_0
	db	DEFCGBL,'or_0',0
	dw	or_1
	db	DEFCGBL,'or_1',0
	dw	or_2
	db	DEFCGBL,'or_2',0
	dw	or_3
	db	DEFCGBL,'or_3',0
	dw	or_4
	db	DEFCGBL,'or_4',0
	dw	or_5
	db	DEFCGBL,'or_5',0
	dw	or_6
	db	DEFCGBL,'or_6',0
	dw	or_7
	db	DEFCGBL,'or_7',0
	dw	xor_0
	db	DEFCGBL,'xor_0',0
	dw	xor_1
	db	DEFCGBL,'xor_1',0
	dw	xor_2
	db	DEFCGBL,'xor_2',0
	dw	xor_3
	db	DEFCGBL,'xor_3',0
	dw	xor_4
	db	DEFCGBL,'xor_4',0
	dw	xor_5
	db	DEFCGBL,'xor_5',0
	dw	xor_6
	db	DEFCGBL,'xor_6',0
	dw	xor_7
	db	DEFCGBL,'xor_7',0
	dw	erase_0
	db	DEFCGBL,'erase_0',0
	dw	erase_1
	db	DEFCGBL,'erase_1',0
	dw	erase_2
	db	DEFCGBL,'erase_2',0
	dw	erase_3
	db	DEFCGBL,'erase_3',0
	dw	erase_4
	db	DEFCGBL,'erase_4',0
	dw	erase_5
	db	DEFCGBL,'erase_5',0
	dw	erase_6
	db	DEFCGBL,'erase_6',0
	dw	erase_7
	db	DEFCGBL,'erase_7',0
	dw	detipg
	db	DEFCGBL,'detipg',0
	dw	eralpha
	db	DEFCGBL,'eralpha',0
	dw	rdpixel
	db	DEFCGBL,'rdpixel',0
	dw	dctipg
	db	DEFCGBL,'dctipg',0
	dw	ddflin
	db	DEFCGBL,'ddflin',0

	dw	dlocal
	db	DEFCGBL,'_dlocal',0
	dw	glo_adj_70
	db	ABSCGBL,'_dlocal',0
	dw	glo_adj_64
	db	ABSCGBL,'set_0',0
	dw	glo_adj_62
	db	ABSCGBL,'set_1',0
	dw	glo_adj_60
	db	ABSCGBL,'set_2',0
	dw	glo_adj_58
	db	ABSCGBL,'set_3',0
	dw	glo_adj_56
	db	ABSCGBL,'set_4',0
	dw	glo_adj_54
	db	ABSCGBL,'set_5',0
	dw	glo_adj_52
	db	ABSCGBL,'set_6',0
	dw	glo_adj_50
	db	ABSCGBL,'set_7',0
	dw	glo_adj_48
	db	ABSCGBL,'or_0',0
	dw	glo_adj_46
	db	ABSCGBL,'or_1',0
	dw	glo_adj_44
	db	ABSCGBL,'or_2',0
	dw	glo_adj_42
	db	ABSCGBL,'or_3',0
	dw	glo_adj_40
	db	ABSCGBL,'or_4',0
	dw	glo_adj_38
	db	ABSCGBL,'or_5',0
	dw	glo_adj_36
	db	ABSCGBL,'or_6',0
	dw	glo_adj_34
	db	ABSCGBL,'or_7',0
	dw	glo_adj_32
	db	ABSCGBL,'xor_0',0
	dw	glo_adj_30
	db	ABSCGBL,'xor_1',0
	dw	glo_adj_28
	db	ABSCGBL,'xor_2',0
	dw	glo_adj_26
	db	ABSCGBL,'xor_3',0
	dw	glo_adj_24
	db	ABSCGBL,'xor_4',0
	dw	glo_adj_22
	db	ABSCGBL,'xor_5',0
	dw	glo_adj_20
	db	ABSCGBL,'xor_6',0
	dw	glo_adj_18
	db	ABSCGBL,'xor_7',0
	dw	glo_adj_16
	db	ABSCGBL,'erase_0',0
	dw	glo_adj_14
	db	ABSCGBL,'erase_1',0
	dw	glo_adj_12
	db	ABSCGBL,'erase_2',0
	dw	glo_adj_10
	db	ABSCGBL,'erase_3',0
	dw	glo_adj_8
	db	ABSCGBL,'erase_4',0
	dw	glo_adj_6
	db	ABSCGBL,'erase_5',0
	dw	glo_adj_4
	db	ABSCGBL,'erase_6',0
	dw	glo_adj_2
	db	ABSCGBL,'erase_7',0

	dw	glo_adj_71
	db	ABSCGBL,'_dlocal',0
	dw	glo_adj_72
	db	ABSCGBL,'_dlocal',0

	dw	0,0
	end

E 1
