;:open1,8,15,"s:mess.kopf":close1
;:open2,8,2,"mess.kopf,p,w
;:sys36864
	;.opt o2
	*= 2049
;*= $8000
; ;.opt oo
tmp	=166
setnam	=65469
setpar	=65466
load	=65493
chrout	=$ffd2
font	=53272
music	=49152
musload	=$a000
fonload	=14336
quote	=212
shift	=657
screen	=1426
color	=54272+screen
clrscr	=$e544
flop	=8
basic	=157
reset	=64738
vic	=$d000
crs1	=204
crs2	=205
crs3	=207
anfang	=168
insert	=216
key	=198
return	=$aad7
speed	=820
anz	=821
adr	=822
oft	=824
test	=825
status	=144
cint	=65409
bank	=56576
	.byt 39,8,195,7,158
	.byte "2089"
	.byt 58,143,20,20,20,20,20,20
	.byt 20,20,20,20,20,20,20,20,20,20,18,82,85,78,32
	.byt 77,69,32,33,13,0,0,0
	jmp begin
	jmp vonvorn
begin	lda #151
	sta bank
	jsr cint
	lda #0
	sta basic
	jsr return
	jsr clrscr
	ldx #189
blend	lda wait-1,x
	sta screen,x
	lda #1
	sta color,x
	dex
	bne blend
	lda #<text
	ldy #>text
	sta anfang
	sty anfang+1
	lda #9
	ldx #<zsat
	ldy #>zsat
	jsr setnam
	ldx #flop
	ldy #0
	jsr setpar
	ldx #0
	ldy #>fonload
	txa
	jsr load
	lda status
	and #%10111111
	sta test
	lda #10
	ldx #<musi
	ldy #>musi
	jsr setnam
	ldx #flop
	ldy #1
	jsr setpar
	lda #96
	sta music
	lda #0
	jsr load
	jsr music
	lda #128
	sta shift
	lda test
	bne vonvorn
	lda #31
	sta font
vonvorn	jsr clrscr
	lda anfang
	ldy anfang+1
	sta tmp
	sty tmp+1
	lda #0
	sta adr
	sta adr+1
	lda #50
	sta speed
main	jsr get
	beq null
	jsr chrout
pause	jsr crsan
	ldy #0
	sty quote
	sty insert
	ldx speed
loop	dey
	bne loop
	dex
	bne loop
	jsr crsof
	jmp main
druta	lda #0
	sta key
drt	cmp key
	beq drt
	sta key
	bne main
null	jsr get
	bne nonull
	jmp reset
ret	cpx #10
	beq druta
	rts
nonull	cpx #8
	beq pause
	cpx #9
	bcs ret
	dex
	beq vonvorn
	dex
	bne no2
	jsr get
	sta speed
	jmp main
no2	dex
	bne no3
	jsr get
	sta vic+32
	jmp main
no3	dex
	bne no4
	jsr get
	sta vic+33
qmain	jmp main
no4	dex
	bne no5
	jsr get
	sta anz
	jsr get
loop3	jsr chrout
	jsr crsan
	ldy #0
	sty quote
	sty insert
	ldx speed
loop2	dey
	bne loop2
	dex
	bne loop2
	jsr crsof
	dec anz
	bne loop3
	beq qmain
no5	dex
	bne no6
	lda tmp
	ldy tmp+1
	sta adr
	sty adr+1
	lda #0
	sta oft
	beq fertig
no6	jsr get
	inc oft
	cmp oft
	beq fertig
	lda adr
	ldy adr+1
	sta tmp
	sty tmp+1
fertig	jmp main
get	ldy #0
	lda (tmp),y
	inc tmp
	bne nocy
	inc tmp+1
nocy	tax
	rts
crsan	pha
	lda #0
	sta crs1
	pla
	rts
crsof	pha
	lda #2
	sta crs2
cw	lda crs3
	bne cw
	inc crs1
	pla
	rts
musi	.byte "mess.music"
zsat	.byte "mess.font"
wait	.byt 61,62,32,20,08,09,19,32,12,05,20,20,05
	.byt 18,32,23,01,19,32,23,18,09,20,20,05,14,32,23,09
	.byt 20,08,32,60,61,32,32,32,32,32,32,32,32,32,32,32
	.byt 32,20,08,05,32,32,14,19,19,32,13,05,19,19,01,07
	.byt 05,45,13,01,11,05,18,32,32,32,32,32,32,32,32,32
	.byt 32,32,32,32,32,32,32,32,32,32,32,08,05,01,04,45
	.byt 22,05,18,19,09,15,14,32,61,32
	.byte "1.1"
	.byt 32,32,32
	.byt 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
	.byt 100,100,100,100,100,100,100,100,100,100,100,100
	.byt 100,100,100,100,100,100,100,100,100,100,100,100,32
	.byt 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
	.byt 160,140,143,129,132,137,142,135,160,174,174
	.byt 160,144,140,133,129,147,133,160,151,129,137
	.byt 148,160
text	=*
