mainloop:
		jsr	music
		jsr	s
		jsr	scrolly
		jsr	end2
		jsr	stop_muzak
		rts

scrolly:
	move.l	$04,a6
	lea	gfxname,a1
	jsr	-408(a6)	;OldOpenLibrary
	move.l	d0,gfxbase
	move.l	d0,a0
	move.l	50(a0),oldclist		;remember CList
	move.l	#newclist,50(a0)	;setnew CList
	move.l	gfxbase,a6
	lea	bitmap,a0
	move.l	#$01,d0		;bitplanes
	move.l	#336,d1		;width
	move.l	#200,d2		;hight
	jsr	-390(a6)	;InitBitMap
	move.l	#$60000,plane1
	lea	rastport,a1
	jsr	-198(a6)	;InitRastPort
	move.l	#bitmap,r_bitmap
	lea	rastport,a1
	jsr	-48(a6)		;ClearScreen
	move.l	#scrollm,zeiger
	move.l	$6c,oldirq+2	;set backjump
	move.l	#newirq,$6c	;set new to jump
wait2:	btst	#6,$bfe001
	bne.s	wait2
	move.l	oldirq+2,$6c	;restore to jump
	move.l	gfxbase,a0
	move.l	oldclist,50(a0)	;restore old CList
	move.l	$04,a6
	move.l	gfxbase,a1
	jsr	-414(a6)	;CloseLibrary
	move.l	#0,d0
	rts

newirq:
	movem.l	d0-d7/a0-a6,-(sp)	;store registers
	move.l	gfxbase,a6
	lea	rastport,a1
	move.l	#01,d0		;delta X
	move.l	#00,d1		;delta Y
	move.l	#000,d2		;minX
	move.l	#000,d3		;minY
	move.l	#336,d4		;maxX
	move.l	#200,d5		;maxY
	jsr	-396(a6)	;ScrollRaster
	sub.b	#$01,rows
	bne.s	exit		;branch if no new char
	move.b	#$08,rows
	lea	rastport,a1
	move.l	#320,d0		;Xpos
	move.l	#110,d1		;Ypos
	jsr	-240(a6)	;Move
	lea	rastport,a1
	move.l	zeiger,a0	;pointer to tekst
	move.l	#$01,d0		;# of chars
	jsr	-60(a6)		;Text
	addq.l	#$01,zeiger
	cmp.l	#end,zeiger
	blt.s	exit		;do not zero ZEIGER
	move.l	#scrollm,zeiger
exit:	movem.l	(sp)+,d0-d7/a0-a6
oldirq:	jmp	$00000000

newclist:
	dc.w	$008e,$2c81,$0090,$f4f0,$0092,$0038,$0094,$00d0
	dc.w	$0102,$0000,$0104,$0000,$0108,$0002,$010a,$0002
	dc.w	$0100,$1200,$0180,$0000,$0182,$0fff
	dc.w	$00e0,$0006,$00e2,$0000
	dc.w	$900f,$fffe,$0180,$0f00,$910f,$fffe,$0180,$000f
	dc.w	$9e0f,$fffe,$0180,$0f00,$9f0f,$fffe,$0180,$0000
	dc.w	$ffff,$fffe

zeiger:		dc.l	0
oldclist:	dc.l	0
gfxbase:	dc.l	0
bitmap:		blk.l	2,0
plane1:		blk.l	20,0
rastport:	dc.l	0
r_bitmap:	blk.l	30,0
rows:		dc.b	2
gfxname:	dc.b	"graphics.library",0
scrollm:	dc.b	" TEAM'89 HE HE HE "
end:


music:	bne.s	start_muzak

main:	btst	#6,$bfe001
	bne.s	main

	bsr.L	stop_muzak
	moveq	#0,d0
	rts

start_muzak:
	move.l	#data,muzakoffset	;** get offset

init0:	move.l	muzakoffset,a0		;** get highest used pattern
	add.l	#472,a0
	move.l	#$80,d0
	clr.l	d1
init1:	move.l	d1,d2
	subq.w	#1,d0
init2:	move.b	(a0)+,d1
	cmp.b	d2,d1
	bgt.s	init1
	dbf	d0,init2
	addq.b	#1,d2

init3:	move.l	muzakoffset,a0		;** calc samplepointers
	lea	pointers(pc),a1
	lsl.l	#8,d2
	lsl.l	#2,d2
	add.l	#600,d2
	add.l	a0,d2
	moveq	#14,d0
init4:	move.l	d2,(a1)+
	clr.l	d1
	move.w	42(a0),d1
	lsl.l	#1,d1
	add.l	d1,d2
	add.l	#30,a0
	dbf	d0,init4

init5:	clr.w	$dff0a8			;** clear used values
	clr.w	$dff0b8
	clr.w	$dff0c8
	clr.w	$dff0d8
	clr.w	timpos
	clr.l	trkpos
	clr.l	patpos

init6:	move.l	muzakoffset,a0		;** initialize timer irq
	move.b	470(a0),numpat+1	;number of patterns
	move.l	$6c.w,lev3save+2
	move.l	#lev3interrupt,$6c.w
	rts

stop_muzak:
	move.l	lev3save+2,$6c.w
	clr.w	$dff0a8
	clr.w	$dff0b8
	clr.w	$dff0c8
	clr.w	$dff0d8
	move.w	#$f,$dff096
	rts

lev3interrupt:
	bsr.s	replay_muzak
lev3save:
	jmp	$0

replay_muzak:
	movem.l	d0-d7/a0-a6,-(a7)
	addq.w	#1,timpos
speed:	cmp.w	#6,timpos
	beq.L	replaystep

chaneleffects:				;** seek effects
	lea	datach0(pc),a6
	tst.b	3(a6)
	beq.s	ceff1
	lea	$dff0a0,a5
	bsr.s	ceff5
ceff1:	lea	datach1(pc),a6
	tst.b	3(a6)
	beq.s	ceff2
	lea	$dff0b0,a5
	bsr.s	ceff5
ceff2:	lea	datach2(pc),a6
	tst.b	3(a6)
	beq.s	ceff3
	lea	$dff0c0,a5
	bsr.s	ceff5
ceff3:	lea	datach3(pc),a6
	tst.b	3(a6)
	beq.s	ceff4
	lea	$dff0d0,a5
	bsr.s	ceff5
ceff4:	movem.l	(a7)+,d0-d7/a0-a6
	rts

ceff5:	move.b	2(a6),d0		;room for some more
	and.b	#$f,d0			;implementations below
	tst.b	d0
	beq.s	arpreggiato
	cmp.b	#1,d0
	beq.L	pitchup
	cmp.b	#2,d0
	beq.L	pitchdown
	cmp.b	#12,d0
	beq.L	setvol
	cmp.b	#14,d0
	beq.L	setfilt
	cmp.b	#15,d0
	beq.L	setspeed
	rts

arpreggiato:				;** spread by time
	cmp.w	#1,timpos
	beq.s	arp1
	cmp.w	#2,timpos
	beq.s	arp2
	cmp.w	#3,timpos
	beq.s	arp3
	cmp.w	#4,timpos
	beq.s	arp1
	cmp.w	#5,timpos
	beq.s	arp2
	rts

arp1:	clr.l	d0			;** get higher note-values
	move.b	3(a6),d0		;   or play original
	lsr.b	#4,d0
	bra.s	arp4
arp2:	clr.l	d0
	move.b	3(a6),d0
	and.b	#$f,d0
	bra.s	arp4
arp3:	move.w	16(a6),d2
	bra.s	arp6
arp4:	lsl.w	#1,d0
	clr.l	d1
	move.w	16(a6),d1
	lea	notetable,a0
arp5:	move.w	(a0,d0.w),d2
	cmp.w	(a0),d1
	beq.s	arp6
	addq.l	#2,a0
	bra.s	arp5
arp6:	move.w	d2,6(a5)
	rts

pitchdown:
	bsr.s	newrou
	clr.l	d0
	move.b	3(a6),d0
	and.b	#$f,d0
	add.w	d0,(a4)
	cmp.w	#$358,(a4)
	bmi.s	ok1
	move.w	#$358,(a4)
ok1:	move.w	(a4),6(a5)
	rts

pitchup:bsr.s	newrou
	clr.l	d0
	move.b	3(a6),d0
	and.b	#$f,d0
	sub.w	d0,(a4)
	cmp.w	#$71,(a4)
	bpl.s	ok2
	move.w	#$71,(a4)
ok2:	move.w	(a4),6(a5)
	rts

setvol:	move.b	3(a6),8(a5)
	rts

setfilt:move.b	3(a6),d0
	and.b	#1,d0
	lsl.b	#1,d0
	and.b	#$fd,$bfe001
	or.b	d0,$bfe001
	rts

setspeed:
	clr.l	d0
	move.b	3(a6),d0
	and.b	#$f,d0
	move.w	d0,speed+2
	rts

newrou:	cmp.l	#datach0,a6
	bne.s	next1
	lea	voi1(pc),a4
	rts
next1:	cmp.l	#datach1,a6
	bne.s	next2
	lea	voi2(pc),a4
	rts
next2:	cmp.l	#datach2,a6
	bne.s	next3
	lea	voi3(pc),a4
	rts
next3:	lea	voi4(pc),a4
	rts

replaystep:				;** work next pattern-step
	clr.w	timpos
	move.l	muzakoffset,a0
	move.l	a0,a3
	add.l	#12,a3			;ptr to soundprefs
	move.l	a0,a2
	add.l	#472,a2			;ptr to pattern-table
	add.l	#600,a0			;ptr to first pattern
	clr.l	d1
	move.l	trkpos,d0		;get ptr to current pattern
	move.b	(a2,d0),d1
	lsl.l	#8,d1
	lsl.l	#2,d1
	add.l	patpos,d1		;get ptr to current step
	clr.w	enbits
	lea	$dff0a0,a5		;chanel 0
	lea	datach0(pc),a6
	bsr.L	chanelhandler
	lea	$dff0b0,a5		;chanel 1
	lea	datach1(pc),a6
	bsr.L	chanelhandler
	lea	$dff0c0,a5		;chanel 2
	lea	datach2(pc),a6
	bsr.L	chanelhandler
	lea	$dff0d0,a5		;chanel 3
	lea	datach3(pc),a6
	bsr.L	chanelhandler
	move.w	#400,d0			;** wait a while and set len
rep1:	dbf	d0,rep1			;   of oneshot to 1 word
	move.w	#$8000,d0
	or.w	enbits,d0
	move.w	d0,$dff096
	cmp.w	#1,datach0+14
	bne.s	rep2
	clr.w	datach0+14
	move.w	#1,$dff0a4
rep2:	cmp.w	#1,datach1+14
	bne.s	rep3
	clr.w	datach1+14
	move.w	#1,$dff0b4
rep3:	cmp.w	#1,datach2+14
	bne.s	rep4
	clr.w	datach2+14
	move.w	#1,$dff0c4
rep4:	cmp.w	#1,datach3+14
	bne.s	rep5
	clr.w	datach3+14
	move.w	#1,$dff0d4

rep5:	add.l	#16,patpos		;next step
	cmp.l	#64*16,patpos		;pattern finished ?
	bne.s	rep6
	clr.l	patpos
	addq.l	#1,trkpos		;next pattern in table
	clr.l	d0
	move.w	numpat,d0
	cmp.l	trkpos,d0		;song finished ?
	bne.s	rep6
	clr.l	trkpos
rep6:	movem.l	(a7)+,d0-d7/a0-a6
	rts

chanelhandler:
	move.l	(a0,d1.l),(a6)		;get period & action-word
	addq.l	#4,d1			;point to next chanel
	clr.l	d2
	move.b	2(a6),d2		;get nibble for soundnumber
	lsr.b	#4,d2
	beq.s	chan2			;no soundchange !
	move.l	d2,d4			;** calc ptr to sample
	lsl.l	#2,d2
	mulu	#30,d4
	lea	pointers-4(pc),a1
	move.l	(a1,d2.l),4(a6)		;store sample-address
	move.w	(a3,d4.l),8(a6)		;store sample-len in words
	move.w	2(a3,d4.l),18(a6)	;store sample-volume

	move.l	d0,-(a7)
	move.b	2(a6),d0
	and.b	#$f,d0
	cmp.b	#$c,d0
	bne.s	ok3
	move.b	3(a6),8(a5)
	bra.s	ok4
ok3:	move.w	2(a3,d4.l),8(a5)	;change chanel-volume
ok4:	move.l	(a7)+,d0

	clr.l	d3
	move.w	4(a3,d4),d3		;** calc repeatstart
	add.l	4(a6),d3
	move.l	d3,10(a6)		;store repeatstart
	move.w	6(a3,d4),14(a6)		;store repeatlength
	cmp.w	#1,14(a6)
	beq.s	chan2			;no sustainsound !
	move.l	10(a6),4(a6)		;repstart  = sndstart
	move.w	6(a3,d4),8(a6)		;replength = sndlength
chan2:	tst.w	(a6)
	beq.s	chan4			;no new note set !
	move.w	22(a6),$dff096		;clear dma
	tst.w	14(a6)
	bne.s	chan3			;no oneshot-sample
	move.w	#1,14(a6)		;allow resume (later)
chan3:	bsr.L	newrou
	move.w	(a6),(a4)
	move.w	(a6),16(a6)		;save note for effect
	move.l	4(a6),0(a5)		;set samplestart
	move.w	8(a6),4(a5)		;set samplelength
	move.w	(a6),6(a5)		;set period
	move.w	22(a6),d0
	or.w	d0,enbits		;store dma-bit
	move.w	18(a6),20(a6)		;volume trigger
chan4:	rts

datach0:	blk.w	11,0
		dc.w	1
datach1:	blk.w	11,0
		dc.w	2
datach2:	blk.w	11,0
		dc.w	4
datach3:	blk.w	11,0
		dc.w	8
voi1:		dc.w	0
voi2:		dc.w	0
voi3:		dc.w	0
voi4:		dc.w	0
pointers:	blk.l	15,0
notetable:	dc.w	856,808,762,720,678,640,604,570
		dc.w	538,508,480,453,428,404,381,360
		dc.w	339,320,302,285,269,254,240,226  
		dc.w	214,202,190,180,170,160,151,143
		dc.w	135,127,120,113,000
muzakoffset:	dc.l	0
trkpos:		dc.l	0
patpos:		dc.l	0
numpat:		dc.w	0
enbits:		dc.w	0
timpos:		dc.w	0
data:		blk.b	00000,0


s:
execbase = 4				;basicadresse exec.library

forbid   = -132				;forbid task switching
permit   = -138				;permit task switching
openlib  = -408				;open a library
closelib = -414				;close a library

start:	movem.l	a0-a6,-(a7)		;save CPU-register
	lea	$70000,a0
	move.w	#$2000,d0
cloop:	clr.b	(a0)+
	dbf	d0,cloop

	move.l	execbase,a6
	jsr	forbid(a6)		;forbid task switching
	bsr	do_open			;open graphics.library
	bsr	install_bitplanes	;write bpl-starts into coplist

	lea	$dff000,a6		;CustomChip base
	move.l	#coplist,$0080(a6)	;activate new Coplist
	clr.w	$0088(a6)
	move.w	#$0020,$009a(a6)	;disable vert.blanc IRQ
	move.w	#$8010,$009a(a6)	;enable Copper IRQ
	move.l	$006c.w,irq_retter+2	;save old IRQ vector
	move.l	#irq,$6c.w		;and point to my IRQ

main_loop:
	bsr	wait_rast		;wait for line 200
	btst	#6,$bfe001		;wait, until left mouse button
	beq.W	end			;is pressed
	bra.S	main_loop

end2:	move.w	#$000f,$0096(a6)	;stop sound
	move.l	grafbase,a1		;activate old Copperlist
	move.l	$0026(a1),$0080(a6)
	clr.w	$0088(a6)
	move.w	#$8020,$009a(a6)	;enable vert.Blanc IRQ
	move.w	#$0010,$009a(a6)	;disable Copper IRQ
	move.l	execbase,a6		;permit task switching
	jsr	permit(a6)
	bsr	do_close		;close graphics.library
	move.l	irq_retter+2(pc),$006c.w;restart old IRQ
	movem.l	(a7)+,a0-a6		;get back CPU-register
	clr.l	d0			;clear Return Code
	rts				;end of program

install_bitplanes:
	move.l	#bitplane1,d0		;1. Bpl adress to d0
	move.w	d0,bitplanes+6		;Lo-word to coplist
	swap	d0			;make Loword = Hiword
	move.w	d0,bitplanes+2		;and write to coplist
	move.l	#bitplane2,d0		;	...
	move.w	d0,bitplanes+14		;	...
	swap	d0			;	...
	move.w	d0,bitplanes+10
	move.l	#bitplane3,d0
	move.w	d0,bitplanes+22
	swap	d0
	move.w	d0,bitplanes+18
	move.l	#bitplane4,d0
	move.w	d0,bitplanes+30
	swap	d0
	move.w	d0,bitplanes+26
	rts

do_open:lea	grafname(pc),a1		;open graphics.library and
	jsr	openlib(a6)		;store base to 'grafbase'
	move.l	d0,grafbase
	rts

do_close:
	move.l	grafbase(pc),a1		;close graphics.library
	jsr	closelib(a6)
	rts


irq:	movem.l	d0-d7/a0-a6,-(a7)	;CPU-register to stack
	move.b	$bfdc00,d0
	move.b	$bfdc01,d0
	move.w	$001e(a6),d0		;IRQ request to d0
	and.w	$001c(a6),d0		;IRQ enabled ?
	btst	#4,d0			;If not enabled or no Copper
	beq.S	endirq			;IRQ => end of own IRQ
	move.w	#$0010,$009c(a6)	;else clear IRQ request
	bsr	scrolling		;Scrolltext moving
	bsr	new_letter		;write new letter to Bpl
endirq:	
	movem.l	(a7)+,d0-d7/a0-a6	;get CPU-register from stack
irq_retter:
	jmp	$000000			;IRQ handling

wait_rast:
	move.w	$0006(a6),d0
	and.w	#$f800,d0
	cmp.w	#$f800,d0
	bne	wait_rast
	rts


scrolling:				;Scrolltext moving
	lea	bitplane1,a0		;1. move Bpl 1
	lea	-$0002(a0),a1
	bsr	do_scroll
	lea	bitplane2,a0		;then Bpl 2
	lea	-$0002(a0),a1
	bsr	do_scroll
	lea	bitplane3,a0		;and Bpl 3
	lea	-$0002(a0),a1
	bsr	do_scroll
	lea	bitplane4,a0
	lea	-$0002(a0),a1
do_scroll:
	move.l	a0,$0050(a6)		;set Source A as Bpl start
	move.l	a1,$0054(a6)		;set D as Bpl - 2 (leftscroll)
	clr.l	$0064(a6)		;set modulo = 0
	clr.w	$0042(a6)		;normal mode (ascending)
	move.l	#$ffffffff,$0044(a6)	;mask = $ffffffff
	move.w	#$c9f0,$0040(a6)	;Use A,D , D = A, Shift 4
	move.w	#$0626,$0058(a6)	;hight = 31,width = 44 Byte
waitblit:
	btst	#14,$0002(a6)		;wait until Blitter is ready
	bne.S	waitblit
	rts				;end of scrolling

new_letter:				;write a new letter to Bpl
	subq.w	#1,scroll_count		;counter for amount of
	bpl	not_new_letter		;left scrolling
	move.w	#$0006,scroll_count	;scroll 6 times before you
					;take a new letter
	bsr.S	clear_letter		;clear actual Bpl-end
	move.l	scroll(pc),a0		;scroll counter (pointer to
	tst.b	(a0)			;actual letter, = 0 ?
	bne.S	donot_restart		;if letter = 0, restart
	lea	scrolltext(pc),a0
donot_restart:
	clr.l	d0
	move.b	(a0)+,d0		;letter ASCII code to d0
	move.l	a0,scroll		;and write new pointer
	cmp.b	#$20,d0			;is it a space ?
	beq.S	not_new_letter		;if it is, end this routine
	lea	realbytes(pc),a0	;else : a0 = table of all
					;possible codes
	move.b	d0,d1			;save d0
	clr.l	d0
cmp_loop:
	move.b	(a0)+,d2		;compare d1 to code no.x
	cmp.b	d1,d2
	beq.S	letter_found		;until it is equal
	add.l	#$1,d0			;else continue
	bra.S	cmp_loop
letter_found:
        lea     zeichen,a3
        bsr     check
        lea	bpl_pointer(pc),a2	;table with Bpl-pointer 1-3
	moveq	#3,d2			;4 Bitplanes
letter_loop2:
	move.l	a3,a0
	move.l	(a2)+,a1		;a1 = bitplane start adress
	move.w	#$002a,d1		;32 lines hihg (1 letter)
letter_loop:
	move.b	(a0),(a1)		;and width of 3 Byte
	move.b	$1(a0),$1(a1)
	move.b	$2(a0),$2(a1)
	move.b	$3(a0),$3(a1)
	lea	$28(a0),a0		;next 3 Byte of Bpl X
	lea	$2c(a1),a1		;next line in bitplane
	dbf	d1,letter_loop		;30 lines
	add.l	#$3520,a3		;next bitplane
	dbf	d2,letter_loop2		;until Bpl 3
not_new_letter:
	rts				;end of new letter

clear_letter:				;clear a letter (space)
	lea	bpl_pointer(pc),a2	;same as above, but
	moveq	#3,d1			;don't copy data but clear
clear_loop1:				;it !!!
	move.l	(a2)+,a0
	move.w	#$002a,d0
clear_loop2:
	clr.l	(a0)
	lea	$002c(a0),a0
	dbf	d0,clear_loop2
	dbf	d1,clear_loop1
	rts

check:
	cmp.l   #$0,d0
	bne	c1
	add.l	#$0,a3
	rts
c1:
	cmp.l	#$1,d0
	bne	c2
	add.l	#$4,a3
	rts
c2:
	cmp.l	#$2,d0
	bne	c3
	add.l	#$8,a3
	rts
c3:
	cmp.l	#$3,d0
	bne	c4
	add.l	#$c,a3
	rts
c4:
	cmp.l	#$4,d0
	bne	c5
	add.l	#$10,a3
	rts
c5:
	cmp.l	#$5,d0
	bne	c6
	add.l	#$14,a3
	rts
c6:
	cmp.l	#$6,d0
	bne	c7
	add.l	#$18,a3
	rts
c7:
	cmp.l	#$7,d0
	bne	c8
	add.l	#$1c,a3
	rts
c8:
	cmp.l	#$8,d0
	bne	c9
	add.l	#$20,a3
	rts
c9:
	cmp.l	#$9,d0
	bne	ca
	add.l	#$690,a3
	rts
ca:
	cmp.l	#$a,d0
	bne	cb
	add.l	#$694,a3
	rts
cb:
	cmp.l	#$b,d0
	bne	cc
	add.l	#$698,a3
	rts
cc:
	cmp.l	#$c,d0
	bne	cd
	add.l	#$69c,a3
	rts
cd:
	cmp.l	#$d,d0
	bne	ce
	add.l	#$6a0,a3
	rts
ce:
	cmp.l	#$e,d0
	bne	cf
	add.l	#$6a4,a3
	rts
cf:
	cmp.l	#$f,d0
	bne	c10
	add.l	#$6a8,a3
	rts
c10:
	cmp.l	#$10,d0
	bne	c11
	add.l	#$6ac,a3
	rts
c11:
	cmp.l	#$11,d0
	bne	c12
	add.l	#$6b0,a3
	rts
c12:
	cmp.l	#$12,d0
	bne	c13
	add.l	#$d20,a3
	rts
c13:
	cmp.l	#$13,d0
	bne	c14
	add.l	#$d24,a3
	rts
c14:
	cmp.l	#$14,d0
	bne	c15
	add.l	#$d28,a3
	rts
c15:
	cmp.l	#$15,d0
	bne	c16
	add.l	#$d2c,a3
	rts
c16:
	cmp.l	#$16,d0
	bne	c17
	add.l	#$d30,a3
	rts
c17:
	cmp.l	#$17,d0
	bne	c18
	add.l	#$d34,a3
	rts
c18:
	cmp.l	#$18,d0
	bne	c19
	add.l	#$d38,a3
	rts
c19:
	cmp.l	#$19,d0
	bne	c1a
	add.l	#$d3c,a3
	rts
c1a:
	cmp.l   #$1a,d0
	bne	c1b
	add.l	#$d40,a3
	rts
c1b:
	cmp.l	#$1b,d0
	bne	c1c
	add.l	#$13b0,a3
	rts
c1c:
	cmp.l	#$1c,d0
	bne	c1d
	add.l	#$13b4,a3
	rts
c1d:
	cmp.l	#$1d,d0
	bne	c1e
	add.l	#$13b8,a3
	rts
c1e:
	cmp.l	#$1e,d0
	bne	c1f
	add.l	#$13bc,a3
	rts
c1f:
	cmp.l	#$1f,d0
	bne	c20
	add.l	#$13c0,a3
	rts
c20:
	cmp.l	#$20,d0
	bne	c21
	add.l	#$13c4,a3
	rts
c21:
	cmp.l	#$21,d0
	bne	c22
	add.l	#$13c8,a3
	rts
c22:
	cmp.l	#$22,d0
	bne	c23
	add.l	#$13cc,a3
	rts
c23:
	cmp.l	#$23,d0
	bne	c24
	add.l	#$13d0,a3
	rts
c24:
	cmp.l	#$24,d0
	bne	c25
	add.l	#$1a40,a3
	rts
c25:
	cmp.l	#$25,d0
	bne	c26
	add.l	#$1a44,a3
	rts
c26:
	cmp.l	#$26,d0
	bne	c27
	add.l	#$1a48,a3
	rts
c27:
	cmp.l	#$27,d0
	bne	c28
	add.l	#$1a4c,a3
	rts
c28:
	cmp.l	#$28,d0
	bne	c29
	add.l	#$1a50,a3
	rts
c29:
	cmp.l	#$29,d0
	bne	c30
	add.l	#$1a54,a3
	rts
c30:
	cmp.l	#$2a,d0
	bne	c31
	add.l	#$1a58,a3
	rts
c31:
	cmp.l	#$2b,d0
	bne	c32
	add.l	#$1a5c,a3
	rts
c32:
	cmp.l	#$2c,d0
	bne	c33
	add.l	#$1a60,a3
	rts
c33:
	cmp.l	#$2d,d0
	bne	c34
	add.l	#$20d0,a3
	rts
c34:
	cmp.l	#$2e,d0
	bne	c35
	add.l	#$20d4,a3
	rts
c35:
	rts

bpl_pointer:	dc.l bitplane1+40,bitplane2+40,bitplane3+40,bitplane4+40
scroll:		dc.l scrolltext
scroll_count:	dc.w 1
realbytes:
	dc.b "ABCDEFGHIJKLMNOPQRSTUVXYZ[';1234567890?!=.,@:+-"
scrolltext:	
	dc.b "ABCDEFGHIJKLMNOPQRSTUVXYZ[';1234567890?!=.,@:+-       "
	dc.b 0
even

grafname:
	dc.b 'graphics.library',0
	even
grafbase:
	dc.l 0

delay:	dc.b 0
	even
coplist:
	dc.l $009c8010,$008e2c61,$00902cd1,$00920038,$009400d0
	dc.l $01040000,$01020000,$01080004,$010a0004,$01004200
	dc.l $00e00007,$00e20000,$00e40007,$00e60000,$00e80007
	dc.l $00ea0000,$00ec0007,$00ee0000,$00f00007,$00f20000
	dc.l $018e0c90,$01900c80,$01920b70,$01940a60,$01960950
	dc.l $01980840,$019a0830,$019c0730,$019e0620
	dc.l $6401fffe,$01800000,$01840f00,$01880fe0,$018a0ec0
	dc.l $018c0db0
;dc.l $01900c80,$01920b70,$01940a60
;dc.l $01960950,$01980840,$019a0830,$019c0730,$019e0620
bitplanes:
	dc.l $00e00000,$00e20000,$00e40000,$00e60000,$00e80000
	dc.l $00ea0000,$00ec0000,$00ee0000
	dc.l $8e01fffe,$01800aaa
	dc.l $00e00007,$00e20000,$00e40007,$00e60000,$00e80007
	dc.l $00ea0000,$00ec0007,$00ee0000
sprite0:
	dc.l $01200000,$01220000,$01240000,$01260000,$01280000,$012a0000
	dc.l $012c0000,$012e0000,$01300000,$01320000,$01340000,$01360000
	dc.l $01380000,$013a0000,$013c0000,$013e0000
	dc.l $fffffffe

zeichen:	blk.b 54400,0
bitplane1:	blk.b 1848,0
bitplane2:	blk.b 1848,0
bitplane3:	blk.b 1848,0
bitplane4:	blk.b 1848,0
