 opt 37› org $9000››scr equ $be70›pos equ $80›ileef equ $83›ilepil equ $84›tmp equ $85›nowyef equ $87›wyn equ $88›px equ $90›py equ $a8›dx equ $c0›dy equ $d8››main lda #2› sta pos› sta pos+1› lda #32+2› jsr $ef90›› lda #$10› ldx #3›setwyn sta wyn,x› dex› bpl setwyn› lda #1› sta ilepil› lda #10› sta px› lda #6› sta py› lda #255› sta dx› sta dy› lda #0› sta ef› lda #10› sta nowyef››loop equ *› dec ileef› bne jestef› lda #0› sta ef›jestef equ *›› dec nowyef› bne nienowy›losuj lda $d20a› cmp #200› bcs losuj› tay› lda $d20a› and #3› tax› lda $d20a› and #$c0› eor efy,x› sta scr+20,y› lda #15› sta nowyef›nienowy equ *›› ldx #10› lda ef› cmp #'F'-' '› bne *+4› ldx #4› cmp #'S'-' '› bne *+4› ldx #20››pij_wolno_bo_sie_upijesz equ *› lda 20› cmp 20› beq *-2› dex› bne pij_wolno_bo_sie_upijesz›› ldx ilepil›ryspil equ *› dex›› lda py,x› jsr mul20› adc px,x› tay› lda #0› sta scr,y›› lda dx,x› clc› adc px,x› sta px,x› ldy #0› cmp #20› bcc niewyp› bpl *+4› ldy #2› lda ef› cmp #'R'-' '› bne nieod1› tya› eor #2› tay›nieod1 lda wyn+1,y› clc› adc #1› cmp #$1a› bcc niedzie› lda wyn,y› clc› adc #1› cmp #$1a› bcc *+4› lda #$10› sta wyn,y› lda #$10›niedzie sta wyn+1,y› lda $d20a› and #3› eor #8› sta px,x› lda $d20a› and #3› eor #4› sta py,x› lda $d20a› and #1› bne *+4› lda #255› sta dx,x›niewyp equ *› lda dy,x› clc› adc py,x› sta py,x›› lda py,x› jsr mul20› adc px,x› tay› lda py,x› beq odbij› cmp #11› bcs odbij› lda scr,y› and #$3f› beq rysuj› cmp #3› bne niepal› lda #0› sec› sbc dx,x› sta dx,x› jmp rysuj›niepal equ *› cmp #'B'-' '› bne niepil›› ldy ilepil› lda #10› sta px,y› lda #6› sta py,y› lda $d20a› and #1› bne *+4› lda #255› sta dx,y› lda $d20a› and #1› bne *+4› lda #255› sta dy,y› inc ilepil››niepil equ *› cmp #'F'-' '› beq setef› cmp #'S'-' '› beq setef› cmp #'R'-' '› bne nieef›setef equ *› sta ef› ldy #75› cmp #'S'› bne *+4› ldy #20› sty ileef›nieef equ *›odbij equ *› lda #0› sec› sbc dy,x› sta dy,x››rysuj equ *› lda #'O'-' '+$40› sta scr,y› txa› beq *+5› jmp ryspil›› ldx #1›ruszp equ *› lda mul19,x›czyscp tay› lda #0› sta scr,y› tya› clc› adc #20› cmp #240› bcc czyscp› ldy pos,x› lda $278,x›  lsr @›  lsr @› lsr @› bcs ngu› dey› bpl ngu› iny›ngu equ *› lsr @› bcs ndul› cpy #7› bcs ndul› iny›ndul equ *› sty pos,x› tya› jsr mul20› cpx #1› bne niepra› clc› adc #19›niepra equ *› tay› cpx #1› lda #6› ror @› sta scr+20,y› sta scr+40,y› sta scr+60,y› lda #0› sta scr,y› sta scr+80,y› dex› bpl ruszp›› ldx #17›mban equ *› lda ban1,x› sta scr+1,x› lda ban2,x› sta scr+221,x› dex› bpl mban› ldx #1›movwyn lda wyn,x› sta scr,x› lda wyn+2,x› sta scr+18,x› dex› bpl movwyn›› lda #8› bit $d20f› beq *+5› jmp loop›› jmp $e474›* rts››mul20 equ *› sta tmp› asl @› asl @› adc tmp -› asl @› asl @› rts››mul19 dta b(0),b(19)›pmwd dta d'pmwd'*›ban1 dta d' gra o flaszke ;) '*›ef equ *›ban2 dta d' pmwd-TUNEL-duszki'›efy dta d'BFSR'›› org $2e0› dta a(main)› end››