!convtab pet *= $7f00 iweeg=$ea81 !word setfloptx,untalk8,unlist8,listen8,positiontx !word gettx,irq,block,nextblock open=$ffc0 icout=$ffa8 icholen=$ffa5 listen=$ffb1 unlist=$ffae seclst=$ff93 filnam=$ffbd close=$ffc3 talk=$ffb4 untalk=$ffab filset=$f31f bsout=$ffd2 clall=$ffe7 filpar=$ffba sectlk=$ff96 filtab=$f30f *= $7000 befehl sei lda #$30 sta 01 ldy #2 lda ($35),y sta $b0 dey lda ($35),y sta $b1 dey lda ($35),y sta $4 ldx #0 ldy #02 asl asl bcc next2 ldx #2 ldy #0 next2 stx $34 lda $4 and #$10 beq next3 clc lda $b0 adc $30,y sta $b0 lda $b1 adc $31,y sta $b1 next3 lda $4 and #$20 beq next4 ldy #0 lda ($b0),y pha iny lda ($b0),y sta $b0 pla sta $b1 next4 asl $4 bcc next5 lda #$37 sta 01 jsr positiontx jsr icintx pha jsr icintx sta $b0 pla sta $b1 next5 lda $4 and #$1f tax lda blh,x sta bgo+1 inx lda blh,x sta bgo+2 jsr nexbef lda #$37 sta 01 ldx $34 bgo jmp 0000 lod lda $b0 sta $30,x lda $b1 sta $31,x jmp befehl sav lda #$30 sta 01 ldy #0 lda $31,x sta ($b0),y lda $30,x iny sta ($b0),y jmp befehl not jsr verhi bne next10 jsr verlo bne next10 next12 jsr nexbef next10 jmp befehl ist jsr verhi beq ist1 bne next12 ist1 jsr verlo beq next10 bne next12 ikl jsr verhi beq ikl1 bcs next12 bne next10 ikl1 jsr verlo bcs next12 bne next10 igr jsr verhi beq igr1 bcs next10 bne next12 igr1 jsr verlo beq next12 bcs next10 bne next12 nexbef clc lda $35 adc #3 sta $35 lda $36 adc #0 sta $36 rts verlo lda $30,x cmp $b0 rts verhi lda $31,x cmp $b1 rts end jsr 64789 jsr 64931 jsr 58648 jsr $8800 jmp $8843 positiontx ldy #00 sty $b5 inc $b5 sty $b2 lda $b0 sta $b3 lda $b1 sta $b4 tya asl $b0 rol $b1 adc #00 sta $b2 clc lda $b0 adc $b3 sta $b0 lda $b1 adc $b4 sta $b1 lda $b2 adc #0 sta $b2 inc $b1 bne nnext2tx inc $b2 nnext2tx ldx #00 txa sta $b6 quaktx dec $b1 bne nnext1tx dec $b2 bmi foundtx nnext1tx inx txa cmp sektorentx,y bne quaktx ldx #0 inc $b5 inc $b6 lda $b6 cmp spurentx,y bne quaktx iny bne nnext2tx foundtx stx $b4 sty $b3 lda #32 sta kommandtx+8 sta kommandtx+11 sta kommandtx+19 sta kommandtx+20 lda $b5 ldy #7 jsr integtx lda $b4 ldy #10 jsr integtx lda $b0 ldy #18 jsr integtx block lda #15 jsr filtab jsr filset jsr listen8 lda #$6f jsr seclst ldy #00 nnext3tx lda kommandtx,y jsr icout iny cpy #12 bne nnext3tx jsr unlist8 lda #08 jsr talk lda #$6f jsr sectlk jsr icholen cmp #"0" beq nodisker jsr zeiletx ldx #00 next444 lda diertxt,x sta $07a4,x inx cpx #16 bne next444 jsr untalk8 next445 lda $dc00 and #$10 bne next445 jsr setfloptx sec lda $35 sbc #03 sta $35 lda $36 sbc #00 sta $36 jmp befehl nodisker jsr untalk8 jsr listen8 lda #$6f jsr seclst ldy #00 nnnext1tx lda kommandtx+12,y jsr icout iny cpy #9 bne nnnext1tx jsr unlist8 lda #8 jsr filtab jsr filset jmp setem icintx sty $f jsr icholen inc $b0 bne nixiii nextblock sta $2b ldy #0 sty $b2 iny sty $b1 ldx $b4 ldy $b3 jsr nnext1tx lda $2b nixiii ldy $f rts txt txa bne next888 jsr zeiletx next888 jsr positiontx lda #00 sta gettx+1 next5tx ldy #0 next4tx jsr gettx cmp #32 bne weit9tx spacetx jsr worttx inc $9e jmp next5tx worttx lda #0 sta $0220,y wort1tx tya clc adc $9e cmp #41 bcs mabl zeile2tx ldx $9e ldy #0 next3tx lda $0220,y beq next6tx sta $07c0,x inx iny bne next3tx next6tx lda #32 sta $07c0,x stx $9e rts weit9tx sta $0220,y iny cpy #35 beq spacetx cmp #00 bne next4tx dey jsr wort1tx jsr untalk8 jmp befehl mabl jsr zeiletx jmp zeile2tx zeiletx lda #$c0 sta 09 lda #$e8 sta 07 ldx #3 stx 08 stx $a inx ldy #$68 next18tx lda (07),y sta (09),y iny bne next18tx inc 8 inc $a dex bne next18tx stx $9e dec $9f beq zeile1tx ret20tx ldx #24 jmp $e9ff zeile1tx ldx #24 jsr $e9ff ldx #8 stx $9f next19tx lda btxtiltx-1,x sta $07cf,x dex bne next19tx jsr untalk8 atx lda $dc00 and #$10 bne atx jsr setem jmp ret20tx gettx ldx #00 bne byte2tx byte1tx sty $af jsr icintx eor #15 sta $2c jsr icintx eor #05 sta $2d jsr icintx eor #73 sta $2e ldy #0 sty $2f jsr step1 jsr step1 lsr $2d ror $2e ror $2f lsr $2d ror $2e ror $2f lsr $2e ror $2f lsr $2e ror $2f lsr $2f lsr $2f next89tx lda $2c,y jsr entzifftx sta $2c,y iny cpy #04 bne next89tx ldy $af inc gettx+1 lda $2c rts byte2tx cpx #03 bne byte3tx lda #$ff sta gettx+1 byte3tx lda $2c,x inc gettx+1 rts entzifftx cmp #53 bcs abc1tx cmp #27 bcs abc2tx rts abc2tx clc adc #38 rts abc1tx tax lda abztx-53,x rts step1 lsr $2c ror $2d ror $2e ror $2f rts integtx sty $b1 sta $63 lda #0 sta $62 ldx #$90 sec jsr $bc49 jsr $bddf ldy $b1 ldx #0 denn1tx lda $0100,x bne denntx rts denntx sta kommandtx,y inx iny bne denn1tx setfloptx jsr clall lda #15 ldx #8 ldy #$6f jsr filpar lda #0 jsr filnam jsr open lda #8 ldx #8 ldy #$68 jsr filpar lda #01 ldx #$a4 ldy #$e0 jsr filnam jmp open add clc lda $30,x adc $b0 sta $30,x lda $31,x adc $b1 sta $31,x jmp befehl sbd sec lda $30,x sbc $b0 sta $30,x lda $31,x sbc $b1 sta $31,x jmp befehl untalk8 lda #8 jmp untalk unlist8 lda #8 jmp unlist listen8 lda #8 jmp listen setem lda #08 jsr talk lda #$68 jmp sectlk sub ldx $02fe lda $35 sta $0120,x lda $36 sta $0121,x inx inx stx $02fe jmp jmp tret ldy $b0 ldx $02fe nextret dex lda $0120,x sta $b1 dex lda $0120,x sta $b0 dey bne nextret stx $02fe jmp jmp sys jmp ($00b0) ente1 jmp ente roo lda #0 sta $b lda #$20 sta $c jsr positiontx lda #168 sta anzahl+1 lda #$40 sta lozei+1 lda #01 sta hizei+1 ldy #0 sty $d jsr icintx sta $a jsr bsouti next jsr icintx sta 9 cmp $a beq pack jsr bsouti quirl bcs ente1 jsr icintx sta $a cmp 9 beq pack jsr bsouti bcs quirl jmp next pack sta 09 jsr icintx tax inx next1 lda 09 jsr bsouti bcs quirl dex beq next jmp next1 bsouti sta ($b),y zeiger jmp grafik grafik jsr zeile bcc ret lda #<(farben) sta zeiger+1 lda #0 sta $b sta hizei+1 lda #$34 sta $c lda #21 sta anzahl+1 lda #40 sta lozei+1 ret clc rts farben jsr zeile bcc ret1 lda #<(schrift) sta zeiger+1 lda #$00 ldy #$80 sta $b lda #$36 sta $c ret1 clc rts schrift iny bne no400 inc $c no400 lda $c cmp #$37 bne ret1 cpy #$bb bne ret1 lda #<(coord) sta zeiger+1 ldy #00 lda #$8c sta $b lda #$3c sta $c clc rts coord iny cpy #$3c bne ret1 lda #<(grafik) sta zeiger+1 sec rts zeile iny anzahl cpy #0 bne ret5 ldy #0 inc $d lda $d cmp #15 bne nex lda #0 sta $d sec rts nex clc lda $b lozei adc #0 sta $b lda $c hizei adc #0 sta $c ret5 clc rts peace2 jsr icintx sta ($1c),y tya clc adc #08 tay rts mitmulti lda #$b2 sta aede+1 lda #$33 sta aede1+1 lda #<(af0a) sta af07+1 lda #>(af0a) sta af07+2 rts nomulti lda #$05 sta aede1+1 lda #$25 sta aede+1 lda #<(af5c) sta aee8+1 lda #>(af5c) sta aee8+2 rts irq sei ldx #<(aece) ldy #>(aece) ruptus stx $0314 sty $0315 cli rts spcirq inc $d019 jmp iweeg aece lda #$13 sta $d011 ldx #08 nex11 dex bne nex11 lda #$d8 sta $d016 sta $d018 lda #$33 sta $d011 aede1 lda #$33 ldx #<(spr2) ldy #>(spr2) jsr setnirq lda #$ff sta $d015 ldx #$20 jsr spriteset aee8 jmp af6c aeeb jsr txscn lda #$fa ldx #<(aece) ldy #>(aece) jsr setnirq af07 jmp af74 af0a ldy #0 lda #1 af0e sta $d800,y sta $d900,y sta $d960,y iny bne af0e sty $03 tya ne1 sta $da60,y iny cpy #$20 bne ne1 lda #$0e af1c sta $da80,y iny bne af1c lda #$d8 sta 4 ldx #0 stx 2 dec af33+2 af31 ldy #0 af33 lda $3780,x sta (3),y inx bne af3f inc af33+2 af3f iny cpy #$15 bne af33 inc 2 lda 2 cmp #$f beq af74 clc lda 3 adc #$28 sta 3 lda 4 adc #0 sta 4 jmp af31 af5c ldy #$28 lda #11 next781 sta $d800-1,y dey bne next781 jsr ablue af6c lda #<(af6c) sta aee8+1 lda #>(af6c) sta aee8+2 dec $0300 bne e lda #04 sta $0300 ldx $0301 lda mitofarb,x sta 53288 inc $0301 cpx #7 bne e lda #0 sta $0301 e jmp iweeg af74 jsr $5000 lda #<(af74) sta af07+1 lda #>(af74) sta af07+2 jmp iweeg ac00 stx ac40+1 stx ac5b+1 stx ac5f+1 inx stx ac45+1 inx stx ac4f+1 stx ac62+1 jsr ac58 lda $12 asl sta $02 lda #00 adc #$20 sta 3 lda $13 sta $28 jsr ac80 clc txa adc 2 ac40 sta $16 tya adc 3 ac45 sta $17 ldx $14 inx txa sec sbc $12 asl ac4f sta $18 jsr ac58 ac53 jmp adf0 ac58 ldy #00 ac5b lda ($16),y eor #$55 ac5f sta ($16),y iny ac62 cpy $18 bne ac5b rts ac80 lda #00 sta $72 sta $29 lda #$28 sta $71 jsr $b357 rts ad00 jsr ae9c beq ac53 cmp #$13 bcs ad12 sta $02b1 ldx #$16 jmp ac00 ad12 cmp #$17 bcs ad1d sta $02b3 ldx #$19 jmp ac00 ad1d cmp #$17 beq ad24 jmp taxi ad24 lda #1 beq ad36 lda #1 sta $d015 lda #0 ldx #$e7 jmp ad41 ad36 lda #3 sta $d015 lda #1 ldx #$17 ad41 sta ad60+1 sta ad24+1 stx aef8+1 sta bernhard+1 ad60 lda #0 beq ad76 dec ad60+1 jsr mitmulti jmp adf0 ad76 inc ad60+1 jsr nomulti jmp adf0 taxi tax qwiit lda $dc00 bit $e027 beq kofi and #$0f cmp #$0f beq qwiit stx $02b5 lda #00 sta $02b4 jsr ada0 jmp adf0 kofi stx $02b7 lda #00 sta $02b6 sei jsr txscn jsr ablue ldx #<(spcirq) ldy #>(spcirq) jsr ruptus jmp befehl ada0 lda $14 sec sbc $12 lsr adc $12 asl php clc adc #$b bcc adb2 plp sec php adb2 sta $d002 lda $d010 ror ror plp rol rol sta $d010 lda $15 sec sbc $13 lsr adc $13 clc adc #$27 sta $d003 rts input jsr mitmulti jsr irq cli inp ldx #0 ldy #4 uyu dex bne uyu dey bne uyu ae32 lda #00 beq ae15 lda #0 sta ae32+1 lda $dc00 and #$fc jmp ae1b ae15 lda $dc00 sta ae32+1 ae1b bit $e027 bne hallo ldx #00 stx hallo+1 jmp ae25 hallo ldx #00 ae23 beq ae3b ae25 and #$f eor #$1f jsr ab3a jmp inp ae3b sta hallo+1 jsr ae86 bernhard ldy #01 bne normal jmp b100 normal lda $11 cmp #$80 bcc ae4d cmp #$e0 bcs ae4d jmp ad60 ae4d jmp ad00 adf0 lda hallo+1 jmp ae25 ae5d clc lda $12 adc $14 sta $14 lda $13 adc $15 sta $15 lda $12 cmp $10 bcs ae84 lda $13 cmp $11 bcs ae84 lda $10 cmp $14 bcs ae84 lda $11 cmp $15 bcs ae84 sec rts ae84 clc rts ae86 lda $d010 lsr lda $d000 ror sec sbc #$b sta $10 lda $d001 sec sbc #$31 sta $11 rts ae9c ldy #00 aea3 ldx #$fc aea5 lda $3c00,y sta $16,x iny inx bne aea5 jsr ae5d bcc aeb7 iny tya lsr lsr rts aeb7 cpy #$f0 bcs aebe jmp aea3 aebe lda #0 rts b100 lda $11 lsr lsr lsr bne b125 lda #01 sta bernhard+1 jmp ad24 b125 cmp #19 beq ibe php sta $28 sta $40 jsr ac80 tya clc adc #$38 sta $1d plp bcs b111 jsr b150 lda $1d sta $3d stx $3c jsr b150 lda $40 sta $02b9 ibe jmp adf0 b111 jsr b160 lda $1d sta $3f stx $3e jsr b160 lda $40 sta $02bb jmp adf0 b150 ldy #0 b152 lda ($3c),y eor #$80 sta ($3c),y iny cpy #$28 bne b152 rts b160 ldy #0 b162 lda ($3e),y eor #$80 sta ($3e),y iny cpy #$28 bne b162 rts aadd sta 02 stx 3 sty 4 jsr ab23 aae6 lda 2 lsr bcc aaee dec $cfff,x aaee lsr bcc aaf4 inc $cfff,x aaf4 lsr bcc ab0f dec $cffe,x pha lda $cffe,x cmp #$ff beq ab05 jmp ab0e ab05 tya eor #$ff and $d010 sta $d010 ab0e pla ab0f lsr bcc ab1e inc $cffe,x bne ab1e tya ora $d010 sta $d010 ab1e ldx 3 ldy 4 rts ab23 lda 2 and #$f0 lsr lsr lsr lsr tax pha sec lda #0 ab30 rol clc dex bne ab30 tay pla asl tax rts ab3a sta 2 stx 3 sty 4 jsr ab23 lda $cfff,x cmp #$32-20 bne ab53 lda 2 and #$fe sta 2 jmp ab5d ab53 cmp #$f8 bne ab5d lda 2 and #$fd sta 2 ab5d lda $cffe,x cmp #$18 bne ab73 tya and $d010 bne ab83 lda 2 and #$fb sta 2 jmp aae6 ab73 cmp #$54 bne ab83 tya and $d010 beq ab83 lda 2 and #$f7 sta 2 ab83 jmp aae6 set ldy $30,x lda $31,x bne multiscr lda #$c0 sta sprzei+1 lda #$07 sta sprzei+2 next410 clc lda sprzei+1 adc #64 sta sprzei+1 lda sprzei+2 adc #00 sta sprzei+2 dey bne next410 jsr positiontx ldy #00 next409 jsr icintx sprzei sta $0000,y iny cpy #63 bne next409 ente jsr untalk8 jmp befehl multiscr lda multipos,y sta $1c lda multipos+6,y sta $1d lda #21 sta $1f jsr positiontx next412 lda #08 ldy #00 sta $1e next411 jsr peace2 jsr peace2 jsr icintx sta ($1c),y dec $1f beq ente tya sec sbc #15 tay dec $1e bne next411 clc lda $1c adc #$40 sta $1c lda $1d adc #01 sta $1d jmp next412 jmp lda $b0 sta $35 lda $b1 sta $36 jmp befehl ego lda $b1 sta $30,x lda #00 sta $31,x jmp befehl setnirq sta $d012 stx $0314 sty $0315 inc $d019 rts spriteset ldy #04 lda #$29 sta ledup7+1 lda #$fa sta ledup8+1 kaffee1 lda xspr-$20,x sta $d000,y lda yspr-$20,x sta $d001,y lda sprfarb-$20,x ledup7 sta $d027 inc ledup7+1 txa ledup8 sta $37fa inc ledup8+1 inx iny iny cpy #$10 bne kaffee1 rts spr2 ldx #$26 jsr spriteset aede lda #$b2 ldx #<(aeeb) ldy #>(aeeb) jsr setnirq jmp iweeg txscn lda #$1b sta $d011 lda #$c8 sta $d016 aef8 lda #$17 sta $d018 lda #$1 sta $d015 rts ablue lda #$0e ldx #00 jodl sta $d828,x sta $d928,x sta $da28,x inx bne jodl rts blh !word roo,sys,txt,ego,add,sbd,ist,not,lod,sav,sub,tret !word jmp,set,ikl,igr kommandtx !pet "u1:8 0 0 0 b-p:8 0 " btxtiltx !byte 27,66,21,20,20,15,14,29 abztx !byte 33,34,44,46,58,40,41,63,59,32,39 sektorentx !byte 21,19,18,17 spurentx !byte 17,7,6,5 multipos !byte $28,$e8,$a8,$68,$48,$30,$21,$24,$28,$2c,$2c,$2c mitofarb !byte 9,11,12,15,1,15,12,11 diertxt !byte 68,73,83,75,69,84,84,69,78,70,69,72,76,69,82,33 yspr !byte $1e,$1e,$1e,$1e,$1e,$1e,$50,$55,$60,$65,$70,$75 xspr !byte $28,$30,$48,$60,$78,$90,$28,$30,$48,$60,$78,$90 sprfarb !byte 1,2,3,4,5,6,7,8,9,10,11,12 *= $8000 lda #<(input) sta $f002 lda #>(input) sta $f001 jmp $8800